Skip to content

Commit 4a97f5c

Browse files
committed
add test_ModuleNotFoundError_repr_with_failed_import
1 parent 126be20 commit 4a97f5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,9 +2630,9 @@ def test_repr(self):
26302630
self.assertEqual(repr(exc),
26312631
"ModuleNotFoundError('test', name='somename', path='somepath')")
26322632

2633-
def test_importerror_name_and_path(self):
2633+
def test_ModuleNotFoundError_repr_with_failed_import(self):
26342634
try:
2635-
import does_not_exist # noqa: F401
2635+
import does_not_exist # type: ignore[import]
26362636
except ModuleNotFoundError as e:
26372637
self.assertEqual(e.name, "does_not_exist")
26382638
self.assertIsNone(e.path)

0 commit comments

Comments
 (0)