From 7820ca5391b05f868348ccb8cf7bd6e3f098b919 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Mon, 1 Apr 2024 15:25:54 +0200 Subject: [PATCH] wip --- test/cli_test.py | 1 - test/helper.py | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/test/cli_test.py b/test/cli_test.py index 89494dc..2a62fe0 100644 --- a/test/cli_test.py +++ b/test/cli_test.py @@ -319,7 +319,6 @@ def test_move_and_write_after_tags_changed_xxx(self): self.assertIsFile(new_path) mediafile = MediaFile(syspath(new_path)) assert mediafile.title == "a new title" - assert False def test_prune_after_move(self): item = self.add_external_track("myexternal") diff --git a/test/helper.py b/test/helper.py index 6b9c582..1d73e7f 100644 --- a/test/helper.py +++ b/test/helper.py @@ -328,15 +328,15 @@ def shutdown(self, wait=True): def convert_command(tag: str) -> str: - match platform.system(): - case "Windows": - return ( - 'powershell -Command "' - "Copy-Item -Path '$source' -Destination '$dest' -NoNewline;" - f"Add-Content -Path '$dest' -Value {tag}" - '"' - ) - case "Linux": - return f"bash -c\" cp '$source' '$dest'; printf {tag} >> '$dest' \"" - case system: - raise Exception(f"Unsupported system: {system}") + system = platform.system() + if system == "Windows": + return ( + 'powershell -Command "' + "Copy-Item -Path '$source' -Destination '$dest' -NoNewline;" + f"Add-Content -Path '$dest' -Value {tag}" + '"' + ) + elif system == "Linux": + return f"bash -c\" cp '$source' '$dest'; printf {tag} >> '$dest' \"" + else: + raise Exception(f"Unsupported system: {system}")