Skip to content

Commit 09a8a3d

Browse files
committed
Polishing style in test/unit/scan/test_folder_traversal.py
1 parent d2bfb40 commit 09a8a3d

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

test/unit/scan/test_folder_traversal.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_folder_with_subfolders(self, tmp_path):
7878

7979
@pytest.mark.skipif(
8080
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
81-
reason="Symlinks not supported on PyPy/Windows"
81+
reason="Symlinks not supported on PyPy/Windows",
8282
)
8383
def test_folder_with_symlink_to_file(self, tmp_path):
8484

@@ -108,7 +108,7 @@ def test_folder_with_symlink_to_file(self, tmp_path):
108108

109109
@pytest.mark.skipif(
110110
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
111-
reason="Symlinks not supported on PyPy/Windows"
111+
reason="Symlinks not supported on PyPy/Windows",
112112
)
113113
@pytest.mark.timeout(5)
114114
def test_folder_with_circular_symlink(self, tmp_path):
@@ -136,7 +136,7 @@ def test_folder_with_circular_symlink(self, tmp_path):
136136

137137
@pytest.mark.skipif(
138138
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
139-
reason="Symlinks not supported on PyPy/Windows"
139+
reason="Symlinks not supported on PyPy/Windows",
140140
)
141141
@pytest.mark.timeout(5)
142142
def test_folder_with_symlink_to_parent(self, tmp_path):
@@ -177,7 +177,7 @@ def test_folder_with_symlink_to_parent(self, tmp_path):
177177

178178
@pytest.mark.skipif(
179179
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
180-
reason="Symlinks not supported on PyPy/Windows"
180+
reason="Symlinks not supported on PyPy/Windows",
181181
)
182182
@pytest.mark.timeout(5)
183183
def test_root_short_loop(self, tmp_path):
@@ -198,16 +198,16 @@ def test_root_short_loop(self, tmp_path):
198198

199199
@pytest.mark.skipif(
200200
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
201-
reason="Symlinks not supported on PyPy/Windows"
201+
reason="Symlinks not supported on PyPy/Windows",
202202
)
203203
@pytest.mark.timeout(5)
204204
def test_root_parent_loop(self, tmp_path):
205205

206206
# Create a symlink that points to the parent of the initial scanning point
207207
# tmp_path
208-
# ── start
209-
# ├── file.txt
210-
# └── symlink -> tmp_path
208+
# ── start
209+
# ├── file.txt
210+
# └── symlink -> tmp_path
211211

212212
(tmp_path / "start").mkdir()
213213
(tmp_path / "start" / "file.txt").write_text("content")
@@ -225,7 +225,7 @@ def test_root_parent_loop(self, tmp_path):
225225

226226
@pytest.mark.skipif(
227227
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
228-
reason="Symlinks not supported on PyPy/Windows"
228+
reason="Symlinks not supported on PyPy/Windows",
229229
)
230230
def test_symlink_that_points_deeper(self, tmp_path):
231231

@@ -266,7 +266,7 @@ def test_symlink_that_points_deeper(self, tmp_path):
266266
fix_windows_path_limit(str(tmp_path / "b" / "d" / "d.txt")),
267267
fix_windows_path_limit(str(tmp_path / "b" / "d" / "e" / "e.txt")),
268268
fix_windows_path_limit(str(tmp_path / "f" / "f.txt")),
269-
fix_windows_path_limit(str(tmp_path / "symlink/e.txt")),
269+
fix_windows_path_limit(str(tmp_path / "symlink" / "e.txt")),
270270
]
271271

272272
@pytest.mark.skipif(
@@ -307,7 +307,7 @@ def test_symlink_that_points_up(self, tmp_path):
307307
fix_windows_path_limit(str(tmp_path / "b" / "c" / "c.txt")),
308308
fix_windows_path_limit(str(tmp_path / "b" / "d" / "d.txt")),
309309
fix_windows_path_limit(str(tmp_path / "b" / "d" / "e" / "e.txt")),
310-
fix_windows_path_limit(str(tmp_path / "b" / "d" / "e" / "symlink/a.txt")),
310+
fix_windows_path_limit(str(tmp_path / "b" / "d" / "e" / "symlink" / "a.txt")),
311311
]
312312

313313
@pytest.mark.skipif(
@@ -349,11 +349,10 @@ def test_elaborate_infinite_loop(self, tmp_path):
349349

350350
@pytest.mark.skipif(
351351
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
352-
reason="Symlinks not supported on PyPy/Windows"
352+
reason="Symlinks not supported on PyPy/Windows",
353353
)
354354
def test_valid_symlink_pattern_where_the_link_goes_down_and_up(self, tmp_path):
355355

356-
# Create a directory structure with a valid symlink pattern where the link goes down and up
357356
# tmp_path
358357
# ├── a
359358
# │ └── a.txt
@@ -395,7 +394,7 @@ def test_valid_symlink_pattern_where_the_link_goes_down_and_up(self, tmp_path):
395394

396395
@pytest.mark.skipif(
397396
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
398-
reason="Symlinks not supported on PyPy/Windows"
397+
reason="Symlinks not supported on PyPy/Windows",
399398
)
400399
def test_valid_symlink_pattern_where_the_link_goes_up_and_down(self, tmp_path):
401400

@@ -435,7 +434,7 @@ def test_valid_symlink_pattern_where_the_link_goes_up_and_down(self, tmp_path):
435434

436435
@pytest.mark.skipif(
437436
platform.system() == 'Windows' and platform.python_implementation() == 'PyPy',
438-
reason="Symlinks not supported on PyPy/Windows"
437+
reason="Symlinks not supported on PyPy/Windows",
439438
)
440439
@pytest.mark.timeout(5)
441440
def test_loop_that_goes_down_and_up(self, tmp_path):

0 commit comments

Comments
 (0)