Fixed isolation of test_check_errors_catches_all_exceptions.
@@ -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)):
+ try:
with self.assertRaises(Exception):
autoreload.check_errors(import_module)('test_exception')
+ finally:
+ autoreload._exception = None
self.assertFileFound(filename)
def test_zip_reload(self):
