File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,11 +322,11 @@ def test_delete_builtins_import(self):
322322 self .assertIn (b"ImportError" , stdout )
323323
324324 def test_from_import_message_for_nonexistent_module (self ):
325- with self .assertRaisesRegexp (ImportError , "^No module named 'bogus'" ):
325+ with self .assertRaisesRegex (ImportError , "^No module named 'bogus'" ):
326326 from bogus import foo
327327
328328 def test_from_import_message_for_existing_module (self ):
329- with self .assertRaisesRegexp (ImportError , "^cannot import name 'bogus'" ):
329+ with self .assertRaisesRegex (ImportError , "^cannot import name 'bogus'" ):
330330 from re import bogus
331331
332332
@@ -689,6 +689,7 @@ def test_missing_source(self):
689689 self .assertTrue (os .path .exists (pyc_file ))
690690 os .remove (self .source )
691691 forget (TESTFN )
692+ importlib .invalidate_caches ()
692693 self .assertRaises (ImportError , __import__ , TESTFN )
693694
694695 @skip_if_dont_write_bytecode
You can’t perform that action at this time.
0 commit comments