Skip to content

Commit

Permalink
skip iffy path shortcut test on windows for github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud committed Nov 2, 2024
1 parent beec7c2 commit 5fae0df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions face/test/test_search_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# from StringIO import StringIO

from pytest import raises
import pytest

from face import (Command,
Parser,
Expand Down Expand Up @@ -92,8 +93,6 @@ def test_search_prs_basic():
assert res.name == 'search'
assert res.flags['verbose'] is True

assert prs.parse(['/search_pkg/__main__.py']).to_cmd_scope()['cmd_'] == 'python -m search_pkg'

res = prs.parse(['search', 'rg', '--glob', '*.py', '-g', '*.md', '--max-count', '5'])
assert res.subcmds == ('rg',)
assert res.flags['glob'] == ['*.py', '*.md']
Expand All @@ -105,6 +104,12 @@ def test_search_prs_basic():
assert res.flags['strategy'] == 'slow'


@pytest.mark.skipif(sys.platform == "win32", reason="Module shortcut test not supported on Windows (mostly on github ci)")
def test_module_shortcut():
prs = get_search_command(as_parser=True)
assert prs.parse(['/search_pkg/__main__.py']).to_cmd_scope()['cmd_'] == 'python -m search_pkg'


def test_prs_sys_argv():
prs = get_search_command(as_parser=True)
old_argv = sys.argv
Expand Down

0 comments on commit 5fae0df

Please sign in to comment.