diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-12-06 17:11:50 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-12-06 17:11:50 +0200 |
commit | e4ecd3d2805abfbd6f6b457939d4026fa19446ce (patch) | |
tree | c93ce180dce6ae47450d45f7dac0e5c9aa8f5923 /astroid/tests | |
parent | 97c9092852d69f9b98b1276e3d10e9d29c7c0224 (diff) | |
download | astroid-e4ecd3d2805abfbd6f6b457939d4026fa19446ce.tar.gz |
AstroidBuildingException is now AstroidBuildingError.
The first name will exist until astroid 2.0.
Diffstat (limited to 'astroid/tests')
-rw-r--r-- | astroid/tests/unittest_builder.py | 2 | ||||
-rw-r--r-- | astroid/tests/unittest_manager.py | 14 | ||||
-rw-r--r-- | astroid/tests/unittest_nodes.py | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/astroid/tests/unittest_builder.py b/astroid/tests/unittest_builder.py index cb5bba9..eb99061 100644 --- a/astroid/tests/unittest_builder.py +++ b/astroid/tests/unittest_builder.py @@ -267,7 +267,7 @@ class BuilderTest(unittest.TestCase): resources.build_file('data/noendingnewline.py') def test_missing_file(self): - with self.assertRaises(exceptions.AstroidBuildingException): + with self.assertRaises(exceptions.AstroidBuildingError): resources.build_file('data/inexistant.py') def test_inspect_build0(self): 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] diff --git a/astroid/tests/unittest_nodes.py b/astroid/tests/unittest_nodes.py index e2e8338..8abd85e 100644 --- a/astroid/tests/unittest_nodes.py +++ b/astroid/tests/unittest_nodes.py @@ -458,7 +458,7 @@ class NameNodeTest(unittest.TestCase): del True """ if sys.version_info >= (3, 0): - with self.assertRaises(exceptions.AstroidBuildingException): + with self.assertRaises(exceptions.AstroidBuildingError): builder.parse(code) else: ast = builder.parse(code) |