use assert[Not]IsInstance where appropriate

This commit is contained in:
Ezio Melotti 2010-01-24 16:58:36 +00:00
parent f14c7fc33d
commit b0f5adc3f4
57 changed files with 269 additions and 272 deletions

View file

@ -14,11 +14,11 @@ class Tests(unittest.TestCase):
for s in snippets:
a = transformer.parse(s)
assert isinstance(a, ast.Module)
self.assertIsInstance(a, ast.Module)
child1 = a.getChildNodes()[0]
assert isinstance(child1, ast.Stmt)
self.assertIsInstance(child1, ast.Stmt)
child2 = child1.getChildNodes()[0]
assert isinstance(child2, ast.Assign)
self.assertIsInstance(child2, ast.Assign)
# This actually tests the compiler, but it's a way to assure the ast
# is correct