Skip to content

Commit

Permalink
Undo test change.
Browse files Browse the repository at this point in the history
This will require further refactoring in another PR.
  • Loading branch information
barneygale committed Sep 23, 2023
1 parent a51d7a0 commit 7e3729e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2263,18 +2263,11 @@ def test_resolve_common(self):
if not self.can_symlink:
self.skipTest("symlinks required")
P = self.cls
# Non-existent file
p = P(BASE, 'foo')
with self.assertRaises(FileNotFoundError) as cm:
with self.assertRaises(OSError) as cm:
p.resolve(strict=True)
self.assertEqual(cm.exception.errno, errno.ENOENT)
# File treated as directory
p = P(BASE, 'fileA', 'fileB')
with self.assertRaises(NotADirectoryError) as cm:
p.resolve(strict=True)
self.assertEqual(cm.exception.errno, errno.ENOTDIR)
# Non-strict
p = P(BASE, 'foo')
self.assertEqualNormCase(str(p.resolve(strict=False)),
os.path.join(BASE, 'foo'))
p = P(BASE, 'foo', 'in', 'spam')
Expand Down

0 comments on commit 7e3729e

Please sign in to comment.