Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ecbc53e

Browse files
adam-grant-hendryLee-W
authored andcommitted
test(cli): skip argcomplete activation on Windows
`argcomplete` does not support Git Bash on Windows out of the box. For details, see https://kislyuk.github.io/argcomplete/#git-bash-support.
1 parent 3dd2e5b commit ecbc53e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_cli.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import subprocess
23
import sys
34

@@ -84,6 +85,10 @@ def test_commitizen_debug_excepthook(capsys):
8485
assert "NotAGitProjectError" in str(excinfo.traceback[0])
8586

8687

88+
@pytest.mark.skipif(
89+
os.name == "nt",
90+
reason="`argcomplete` does not support Git Bash on Windows.",
91+
)
8792
def test_argcomplete_activation():
8893
"""
8994
This function is testing the one-time activation of argcomplete for
@@ -92,7 +97,7 @@ def test_argcomplete_activation():
9297
Equivalent to run:
9398
$ eval "$(register-python-argcomplete pytest)"
9499
"""
95-
output = subprocess.run(["register-python-argcomplete", "cz"])
100+
output = subprocess.run(["py", "-m", "register-python-argcomplete", "cz"])
96101

97102
assert output.returncode == 0
98103

0 commit comments

Comments
 (0)