##// END OF EJS Templates
Fix Integer() wrapper transformer, thanks to @asmeurer
Thomas Kluyver -
Show More
@@ -486,6 +486,7 b' class IntegerWrapper(ast.NodeTransformer):'
486 486 if isinstance(node.n, int):
487 487 return ast.Call(func=ast.Name(id='Integer', ctx=ast.Load()),
488 488 args=[node], keywords=[])
489 return node
489 490
490 491 class TestAstTransform2(unittest.TestCase):
491 492 def setUp(self):
@@ -506,6 +507,10 b' class TestAstTransform2(unittest.TestCase):'
506 507 ip.run_cell("n = 2")
507 508 self.assertEqual(self.calls, [(2,)])
508 509
510 # This shouldn't throw an error
511 ip.run_cell("o = 2.0")
512 self.assertEqual(ip.user_ns['o'], 2.0)
513
509 514 def test_timeit(self):
510 515 called = set()
511 516 def f(x):
General Comments 0
You need to be logged in to leave comments. Login now