From 143c4cccba53ca790721923b4dc93e2da5eb6054 Mon Sep 17 00:00:00 2001 From: kubouch Date: Sun, 25 Sep 2022 17:48:11 +0200 Subject: [PATCH] Always quote commands except Nushell --- tests/unit/activation/conftest.py | 2 +- tests/unit/activation/test_nushell.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/activation/conftest.py b/tests/unit/activation/conftest.py index d441eb1b0..3b0bdb241 100644 --- a/tests/unit/activation/conftest.py +++ b/tests/unit/activation/conftest.py @@ -161,7 +161,7 @@ def print_prompt(self): return NotImplemented def activate_call(self, script): - cmd = " ".join([str(cmd) for cmd in self.activate_cmd]) + cmd = " ".join([self.quote(str(cmd)) for cmd in self.activate_cmd]) scr = self.quote(str(script)) return f"{cmd} {scr}".strip() diff --git a/tests/unit/activation/test_nushell.py b/tests/unit/activation/test_nushell.py index a778d4975..377233eb2 100644 --- a/tests/unit/activation/test_nushell.py +++ b/tests/unit/activation/test_nushell.py @@ -18,4 +18,9 @@ def __init__(self, session): def print_prompt(self): return r"$env.VIRTUAL_PROMPT" + def activate_call(self, script): + cmd = " ".join([str(cmd) for cmd in self.activate_cmd]) + scr = self.quote(str(script)) + return f"{cmd} {scr}".strip() + activation_tester(Nushell)