From 7e3729e017673a89b21d6960a37955a31ce0dd23 Mon Sep 17 00:00:00 2001 From: barneygale Date: Sat, 23 Sep 2023 18:30:32 +0100 Subject: [PATCH] Undo test change. This will require further refactoring in another PR. --- Lib/test/test_pathlib.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index f8fee9a683d47c..203e6022709003 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -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')