Fixed isolation of test_check_errors_catches_all_exceptions.
This commit is contained in:
parent
bef6f75842
commit
e8b4f23115
|
@ -98,8 +98,11 @@ class TestIterModulesAndFiles(SimpleTestCase):
|
|||
filename = self.temporary_file('test_exception.py')
|
||||
filename.write_text('raise Exception')
|
||||
with extend_sys_path(str(filename.parent)):
|
||||
with self.assertRaises(Exception):
|
||||
autoreload.check_errors(import_module)('test_exception')
|
||||
try:
|
||||
with self.assertRaises(Exception):
|
||||
autoreload.check_errors(import_module)('test_exception')
|
||||
finally:
|
||||
autoreload._exception = None
|
||||
self.assertFileFound(filename)
|
||||
|
||||
def test_zip_reload(self):
|
||||
|
|
Loading…
Reference in New Issue