diff options
Diffstat (limited to 'astroid/tests/unittest_manager.py')
-rw-r--r-- | astroid/tests/unittest_manager.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/astroid/tests/unittest_manager.py b/astroid/tests/unittest_manager.py index 6fc0776..37e3ae0 100644 --- a/astroid/tests/unittest_manager.py +++ b/astroid/tests/unittest_manager.py @@ -68,7 +68,7 @@ class AstroidManagerTest(resources.SysPathSetup, self.assertIn('unittest', self.manager.astroid_cache) def test_ast_from_file_name_astro_builder_exception(self): - self.assertRaises(exceptions.AstroidBuildingException, + self.assertRaises(exceptions.AstroidBuildingError, self.manager.ast_from_file, 'unhandledName') def test_do_not_expose_main(self): @@ -88,7 +88,7 @@ class AstroidManagerTest(resources.SysPathSetup, self.assertEqual(astroid.pure_python, False) def test_ast_from_module_name_astro_builder_exception(self): - self.assertRaises(exceptions.AstroidBuildingException, + self.assertRaises(exceptions.AstroidBuildingError, self.manager.ast_from_module_name, 'unhandledModule') @@ -140,7 +140,7 @@ class AstroidManagerTest(resources.SysPathSetup, def test_file_from_module_name_astro_building_exception(self): """check if the method launch a exception with a wrong module name""" - self.assertRaises(exceptions.AstroidBuildingException, + self.assertRaises(exceptions.AstroidBuildingError, self.manager.file_from_module_name, 'unhandledModule', None) def test_ast_from_module(self): @@ -179,7 +179,7 @@ class AstroidManagerTest(resources.SysPathSetup, def test_ast_from_class_attr_error(self): """give a wrong class at the ast_from_class method""" - self.assertRaises(exceptions.AstroidBuildingException, + self.assertRaises(exceptions.AstroidBuildingError, self.manager.ast_from_class, None) def testFailedImportHooks(self): @@ -187,13 +187,13 @@ class AstroidManagerTest(resources.SysPathSetup, if modname == 'foo.bar': return unittest else: - raise exceptions.AstroidBuildingException() + raise exceptions.AstroidBuildingError() - with self.assertRaises(exceptions.AstroidBuildingException): + with self.assertRaises(exceptions.AstroidBuildingError): self.manager.ast_from_module_name('foo.bar') self.manager.register_failed_import_hook(hook) self.assertEqual(unittest, self.manager.ast_from_module_name('foo.bar')) - with self.assertRaises(exceptions.AstroidBuildingException): + with self.assertRaises(exceptions.AstroidBuildingError): self.manager.ast_from_module_name('foo.bar.baz') del self.manager._failed_import_hooks[0] |