Skip to content

Commit 55756f8

Browse files
authored
Merge pull request #2369 from kobarity/issue/2330
Fix test_find_imports_in_file_error failing on Windows
2 parents 6f29cb9 + c3a602c commit 55756f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/test_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def test_find_imports_in_file(imperfect):
9595

9696

9797
def test_find_imports_in_file_error(tmpdir):
98-
broken_link = tmpdir.join("broken_link.py")
99-
broken_link.mksymlinkto("not-exist")
98+
test_path = tmpdir.join("test_path.py")
99+
test_path.mkdir()
100100
with pytest.warns(UserWarning):
101-
assert not list(api.find_imports_in_file(broken_link))
101+
assert not list(api.find_imports_in_file(test_path))
102102

103103

104104
def test_find_imports_in_code():

0 commit comments

Comments
 (0)