Skip to content

Commit e7df8f6

Browse files
Tor ColvinTor Colvin
authored andcommitted
lint
1 parent 80985d2 commit e7df8f6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

changelog/6755.bugfix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Support deleting paths longer than 260 characters on windows created inside tmpdir.
1+
Support deleting paths longer than 260 characters on windows created inside tmpdir.

src/_pytest/pathlib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def chmod_rw(p: str) -> None:
9999
func(path)
100100
return True
101101

102+
102103
def create_long_path(path: Path) -> Path:
103104
"""Construct a path which will work on Windows if greater
104105
than 260 characters. Resolves into a absolute path which
@@ -111,6 +112,7 @@ def create_long_path(path: Path) -> Path:
111112
path = Path("\\\\?\\" + str(path))
112113
return path
113114

115+
114116
def rm_rf(path: Path) -> None:
115117
"""Remove the path contents recursively, even if some elements
116118
are read-only.

testing/test_pathlib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def renamed_failed(*args):
9090
maybe_delete_a_numbered_dir(path)
9191
assert not lock_path.is_file()
9292

93+
9394
def test_long_path_during_cleanup(tmp_path):
9495
"""Ensure that deleting long path works (particularly on Windows (#6775))."""
9596
path = tmp_path / ("a" * 200)

0 commit comments

Comments
 (0)