Skip to content

Commit c404cce

Browse files
committed
Skip argcomplete-related tests on Windows since that module isn't available on Windows
1 parent 44fc8d1 commit c404cce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_bashcompletion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
import sys
1212
from typing import List
1313

14-
from cmd2.argcomplete_bridge import tokens_for_completion
1514
from cmd2.argparse_completer import ACArgumentParser, AutoCompleter
1615

1716

1817
try:
19-
from cmd2.argcomplete_bridge import CompletionFinder
18+
from cmd2.argcomplete_bridge import CompletionFinder, tokens_for_completion
2019
skip_reason1 = False
2120
skip_reason = ''
2221
except ImportError:
@@ -233,7 +232,7 @@ def test_fail_alt_stderr(parser1, capfd, mock):
233232
assert out == exp_out
234233
assert err == exp_err
235234

236-
235+
@pytest.mark.skipif(skip_reason1, reason=skip_reason)
237236
def test_argcomplete_tokens_for_completion_simple():
238237
line = 'this is "a test"'
239238
endidx = len(line)
@@ -244,6 +243,7 @@ def test_argcomplete_tokens_for_completion_simple():
244243
assert begin_idx == line.rfind("is ") + len("is ")
245244
assert end_idx == end_idx
246245

246+
@pytest.mark.skipif(skip_reason1, reason=skip_reason)
247247
def test_argcomplete_tokens_for_completion_unclosed_quotee_exception():
248248
line = 'this is "a test'
249249
endidx = len(line)

0 commit comments

Comments
 (0)