fix(tests): skip config.save() in config_editor unit tests
Tests using execute_action() triggered Config::save() with a default Config, silently overwriting ~/.config/owlry/config.toml on every `cargo test` run. Guard the save call with #[cfg(not(test))].
This commit is contained in:
@@ -70,6 +70,7 @@ impl ConfigProvider {
|
||||
false
|
||||
};
|
||||
|
||||
#[cfg(not(test))]
|
||||
if result
|
||||
&& let Err(e) = cfg.save()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user