Skip to content

Commit c3a602c

Browse files
author
KOBAYASHI Shinji
committed
Fix test_find_imports_in_file_error failing on Windows
1 parent 6f29cb9 commit c3a602c

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)