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): |
@@ -505,6 +506,10 b' class TestAstTransform2(unittest.TestCase):' | |||
|
505 | 506 | def test_run_cell(self): |
|
506 | 507 | ip.run_cell("n = 2") |
|
507 | 508 | self.assertEqual(self.calls, [(2,)]) |
|
509 | ||
|
510 | # This shouldn't throw an error | |
|
511 | ip.run_cell("o = 2.0") | |
|
512 | self.assertEqual(ip.user_ns['o'], 2.0) | |
|
508 | 513 | |
|
509 | 514 | def test_timeit(self): |
|
510 | 515 | called = set() |
General Comments 0
You need to be logged in to leave comments.
Login now