Skip to content

Commit 203ec3d

Browse files
committed
Apply suggestions from code review
1 parent bed850e commit 203ec3d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Lib/test/test_pathlib.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2479,9 +2479,10 @@ def test_complex_symlinks_relative_dot_dot(self):
24792479
self._check_complex_symlinks(os.path.join('dirA', '..'))
24802480

24812481
class WalkTests(unittest.TestCase):
2482+
cls = pathlib.Path
24822483

24832484
def setUp(self):
2484-
P = pathlib.Path
2485+
P = self.cls
24852486
self.addCleanup(os_helper.rmtree, os_helper.TESTFN)
24862487

24872488
# Build:
@@ -2551,7 +2552,7 @@ def setUp(self):
25512552
del self.sub2_tree[1][:1]
25522553

25532554
def test_walk_topdown(self):
2554-
P = pathlib.Path
2555+
P = self.cls
25552556
all = list(self.walk_path.walk())
25562557

25572558
self.assertEqual(len(all), 4)
@@ -2657,7 +2658,7 @@ def test_walk_bad_dir(self):
26572658
path1new.rename(path1)
26582659

26592660
def test_walk_many_open_files(self):
2660-
P = pathlib.Path
2661+
P = self.cls
26612662
depth = 30
26622663
base = P(os_helper.TESTFN, 'deep')
26632664
p = P(base, *(['d']*depth))

0 commit comments

Comments
 (0)