From 411cd4a456c7340ab3eb97c474977f7a2fc6849b Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Fri, 20 Oct 2023 11:44:22 +0200 Subject: [PATCH] Fix test_remove_virtual_package on Windows (#2924) --- mamba/tests/test_all.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mamba/tests/test_all.py b/mamba/tests/test_all.py index f8521bf20f..ba7b9bab6d 100644 --- a/mamba/tests/test_all.py +++ b/mamba/tests/test_all.py @@ -349,7 +349,12 @@ def test_info(use_json): ) def test_remove_virtual_package(virtual_package_name): # non-regression test for https://github.com/mamba-org/mamba/issues/2129 - with Environment("bash") as env: + if platform.system() == "Windows": + shell_type = "cmd.exe" + else: + shell_type = "bash" + + with Environment(shell_type) as env: # The platform specific virtual package should be "installed" by default. out = env.mamba("info -q") assert virtual_package_name in "\n".join(out)