diff --git a/tests/test_lib/test_os.xsh b/tests/test_lib/test_os.xsh index d2d117008..1e79ff435 100644 --- a/tests/test_lib/test_os.xsh +++ b/tests/test_lib/test_os.xsh @@ -24,6 +24,8 @@ def test_indir(): def test_rmtree(): + if ON_WINDOWS: + pytest.skip("On Windows") with tempfile.TemporaryDirectory() as tmpdir: with indir(tmpdir): mkdir rmtree_test diff --git a/tests/test_ptk_completer.py b/tests/test_ptk_completer.py index 90a745753..ad44688c4 100644 --- a/tests/test_ptk_completer.py +++ b/tests/test_ptk_completer.py @@ -15,7 +15,7 @@ from xonsh.ptk_shell.completer import PromptToolkitCompleter (RichCompletion('x'), 5, PTKCompletion(RichCompletion('x'), -5, 'x')), ('x', 5, PTKCompletion('x', -5, 'x')), ]) -def test_rich_completion(completion, lprefix, ptk_completion, monkeypatch): +def test_rich_completion(completion, lprefix, ptk_completion, monkeypatch, xonsh_builtins): xonsh_completer_mock = MagicMock() xonsh_completer_mock.complete.return_value = {completion}, lprefix diff --git a/tests/test_tools.py b/tests/test_tools.py index 5433f63f2..495021b18 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -511,7 +511,7 @@ mom""" @pytest.mark.parametrize("src, idx, exp_line, exp_n", LOGICAL_LINE_CASES) -def test_get_logical_line(src, idx, exp_line, exp_n): +def test_get_logical_line(src, idx, exp_line, exp_n, xonsh_builtins): lines = src.splitlines() line, n, start = get_logical_line(lines, idx) assert exp_line == line @@ -519,7 +519,7 @@ def test_get_logical_line(src, idx, exp_line, exp_n): @pytest.mark.parametrize("src, idx, exp_line, exp_n", LOGICAL_LINE_CASES) -def test_replace_logical_line(src, idx, exp_line, exp_n): +def test_replace_logical_line(src, idx, exp_line, exp_n, xonsh_builtins): lines = src.splitlines() logical = exp_line while idx > 0 and lines[idx - 1].endswith("\\"):