Skip to content

Commit d2649a6

Browse files
committed
Undo unnecessary test changes
1 parent 4b5d333 commit d2649a6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_pathlib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,8 @@ def test_cwd(self):
15541554
def test_absolute_common(self):
15551555
P = self.cls
15561556

1557-
with os_helper.change_cwd(BASE):
1557+
with mock.patch("os.getcwd") as getcwd:
1558+
getcwd.return_value = BASE
15581559

15591560
# Simple relative paths.
15601561
self.assertEqual(str(P().absolute()), BASE)
@@ -2992,10 +2993,9 @@ def test_absolute(self):
29922993
self.assertEqual(str(P(share + 'a\\b').absolute()), share + 'a\\b')
29932994

29942995
# UNC relative paths.
2995-
def getfullpathname(path):
2996-
return os.path.join(share, path)
2996+
with mock.patch("os.getcwd") as getcwd:
2997+
getcwd.return_value = share
29972998

2998-
with mock.patch("nt._getfullpathname", getfullpathname):
29992999
self.assertEqual(str(P().absolute()), share)
30003000
self.assertEqual(str(P('.').absolute()), share)
30013001
self.assertEqual(str(P('a').absolute()), os.path.join(share, 'a'))

0 commit comments

Comments
 (0)