Skip to content

Commit 849e3ad

Browse files
Tor ColvinTor Colvin
authored andcommitted
Change assert to os.path.exists since too long will fail with pathlib
1 parent aa7a57a commit 849e3ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

testing/test_pathlib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import py
55

66
import pytest
7+
from _pytest.pathlib import create_long_path
78
from _pytest.pathlib import fnmatch_ex
89
from _pytest.pathlib import get_lock_path
910
from _pytest.pathlib import maybe_delete_a_numbered_dir
@@ -101,4 +102,5 @@ def test_long_path_during_cleanup(tmp_path):
101102

102103
lock_path = get_lock_path(path)
103104
maybe_delete_a_numbered_dir(path)
104-
assert not lock_path.is_file()
105+
# is_file also fails on the long path
106+
assert not os.path.exists(create_long_path(lock_path))

0 commit comments

Comments
 (0)