From 722e8dffcf411935debc42087c92dccda13d3afa 2014-09-07 18:22:03 From: Scott Sanderson Date: 2014-09-07 18:22:03 Subject: [PATCH] TEST: Fix invalid ast transformer in test. The ast transformer used in test_interactiveshell.TestAstTransformError had an incorrect method signature, causing it to raise a TypeError when called, rather than the expected ValueError. This change makes the test transformer actually throw the expected error. --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index de8d8d7..cc3ce21 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -681,7 +681,7 @@ class TestAstTransform2(unittest.TestCase): class ErrorTransformer(ast.NodeTransformer): """Throws an error when it sees a number.""" - def visit_Num(self): + def visit_Num(self, node): raise ValueError("test") class TestAstTransformError(unittest.TestCase):