Show More
@@ -486,6 +486,7 b' class IntegerWrapper(ast.NodeTransformer):' | |||||
486 | if isinstance(node.n, int): |
|
486 | if isinstance(node.n, int): | |
487 | return ast.Call(func=ast.Name(id='Integer', ctx=ast.Load()), |
|
487 | return ast.Call(func=ast.Name(id='Integer', ctx=ast.Load()), | |
488 | args=[node], keywords=[]) |
|
488 | args=[node], keywords=[]) | |
|
489 | return node | |||
489 |
|
490 | |||
490 | class TestAstTransform2(unittest.TestCase): |
|
491 | class TestAstTransform2(unittest.TestCase): | |
491 | def setUp(self): |
|
492 | def setUp(self): | |
@@ -505,6 +506,10 b' class TestAstTransform2(unittest.TestCase):' | |||||
505 | def test_run_cell(self): |
|
506 | def test_run_cell(self): | |
506 | ip.run_cell("n = 2") |
|
507 | ip.run_cell("n = 2") | |
507 | self.assertEqual(self.calls, [(2,)]) |
|
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 | def test_timeit(self): |
|
514 | def test_timeit(self): | |
510 | called = set() |
|
515 | called = set() |
General Comments 0
You need to be logged in to leave comments.
Login now