diff --git a/py_src/jupyter_lsp/tests/test_paths.py b/py_src/jupyter_lsp/tests/test_paths.py index a115ae840..0a0a8d0f7 100644 --- a/py_src/jupyter_lsp/tests/test_paths.py +++ b/py_src/jupyter_lsp/tests/test_paths.py @@ -32,13 +32,13 @@ def test_normalize_posix_path_home_subdir( assert normalized_uri(root_dir) == expected_root_uri -@pytest.mark.skipif(~WIN, reason="can't test Windows paths on POSIX") +@pytest.mark.skipif(not WIN, reason="can't test Windows paths on POSIX") @pytest.mark.parametrize( "root_dir, expected_root_uri", [ ["c:\\Users\\user1", "file:///c:/Users/user1"], ["C:\\Users\\user1", "file:///c:/Users/user1"], - ["//VBOXSVR/shared-folder", "file://vboxsvr/shared-folder"], + ["//VBOXSVR/shared-folder", "file://vboxsvr/shared-folder/"], ], ) def test_normalize_windows_path_case(root_dir, expected_root_uri): # pragma: no cover @@ -58,12 +58,13 @@ def test_file_uri_to_path_posix(file_uri, expected_posix_path): # pragma: no co assert file_uri_to_path(file_uri) == expected_posix_path -@pytest.mark.skipif(~WIN, reason="can't test Windows paths on POSIX") +@pytest.mark.skipif(not WIN, reason="can't test Windows paths on POSIX") @pytest.mark.parametrize( "file_uri, expected_windows_path", [ - ["file:///C:/Windows/System32/Drivers/etc", r"C:\Windows\System32\Drivers\etc"], - ["file:///C:/some%20dir/some%20file.txt", r"C:\some dir\some file.txt"], + # https://github.com/krassowski/jupyterlab-lsp/pull/305#issuecomment-665996145 + ["file:///C:/Windows/System32/Drivers/etc", "C:/Windows/System32/Drivers/etc"], + ["file:///C:/some%20dir/some%20file.txt", "C:/some dir/some file.txt"], ], ) def test_file_uri_to_path_windows(file_uri, expected_windows_path): # pragma: no cover