mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 00:24:25 +01:00
Use already generated config path in test_edit_config_with_custom_path
This commit is contained in:
parent
1a1fcbc3bc
commit
1e1c649398
1 changed files with 4 additions and 8 deletions
|
|
@ -130,13 +130,9 @@ class ConfigCommandTest(BeetsTestCase):
|
|||
execlp.assert_called_once_with("myeditor", "myeditor", self.config_path)
|
||||
|
||||
def test_edit_config_with_custom_config_path(self):
|
||||
alt_config_path = os.path.join(
|
||||
self.temp_dir.decode(), "alt_config.yaml"
|
||||
)
|
||||
with open(self.config_path, "w") as file:
|
||||
file.write("option: alt value\n")
|
||||
|
||||
os.environ["EDITOR"] = "myeditor"
|
||||
with patch("os.execlp") as execlp:
|
||||
self.run_command("--config", alt_config_path, "config", "-e")
|
||||
execlp.assert_called_once_with("myeditor", "myeditor", alt_config_path)
|
||||
self.run_command("--config", self.cli_config_path, "config", "-e")
|
||||
execlp.assert_called_once_with(
|
||||
"myeditor", "myeditor", self.cli_config_path
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue