summaryrefslogtreecommitdiff
path: root/astroid/tests/unittest_objects.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-05-29 16:58:58 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-05-29 16:58:58 +0300
commitea2c98310d103dfa9bf596d9c54a873e401356cf (patch)
tree6c8ef9f1220bf4f6d1cefa7ffd860990246aa748 /astroid/tests/unittest_objects.py
parent08b05056af12e103c2f37569ad5091ca5fd4d787 (diff)
downloadastroid-git-ea2c98310d103dfa9bf596d9c54a873e401356cf.tar.gz
Add a new SuperError exception subclass, SuperArgumentTypeError, which is raised when there's a problem with any argument of the super call (invalid types).
Diffstat (limited to 'astroid/tests/unittest_objects.py')
-rw-r--r--astroid/tests/unittest_objects.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/astroid/tests/unittest_objects.py b/astroid/tests/unittest_objects.py
index 31f648eb..24844291 100644
--- a/astroid/tests/unittest_objects.py
+++ b/astroid/tests/unittest_objects.py
@@ -239,7 +239,7 @@ class SuperTests(unittest.TestCase):
for node in ast_nodes[1:]:
inferred = next(node.infer())
self.assertIsInstance(inferred, objects.Super, node)
- with self.assertRaises(exceptions.SuperError) as cm:
+ with self.assertRaises(exceptions.SuperArgumentTypeError) as cm:
inferred.super_mro()
self.assertEqual(str(cm.exception),
"super(type, obj): obj must be an instance "
@@ -486,7 +486,9 @@ class SuperTests(unittest.TestCase):
''')
inferred = next(node.infer())
with self.assertRaises(exceptions.SuperError):
- inferred.super_mro()
+ inferred.super_mro()
+ with self.assertRaises(exceptions.SuperArgumentTypeError):
+ inferred.super_mro()
if __name__ == '__main__':