diff --git a/test/helper.py b/test/helper.py index 6b9c582..a4657ad 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 == "Window": + 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}")