Skip to content
Myr

Skip test on Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Taylor Payne · committed by Taylor Payne · parent 3f91d21 · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • tests:+5 added−1 removed

1 file+5 added−1 removed

modified:tests/test_types.py+5 added-1 removed
1import os.path2import pathlib3import platform4import tempfile56import pytest7
226 unmodified lines
234 message = FileError(filename="\udcff").format_message()235 assert message == "Could not open file '�': unknown error"236237238@pytest.mark.skipif(239 platform.system() == "Windows", reason="Filepath syntax differences."240)241def test_path_type_with_esc_sequence():242 with pytest.raises(click.BadParameter) as exc_info:243 with tempfile.TemporaryDirectory(prefix=r"my\ndir") as tempdir:240 click.Path(dir_okay=False, resolve_path=True).convert(tempdir, None, None)244 click.Path(dir_okay=False).convert(tempdir, None, None)245246 expected = "my\\\\ndir"247 assert expected in exc_info.value.message