(self)
| 680 | self.assertEqual(called, [5]) |
| 681 | |
| 682 | def test_macro(self): |
| 683 | ip.push({'a':10}) |
| 684 | # The AST transformation makes this do a+=-1 |
| 685 | ip.define_macro("amacro", "a+=1\nprint(a)") |
| 686 | |
| 687 | with tt.AssertPrints("9"): |
| 688 | ip.run_cell("amacro") |
| 689 | with tt.AssertPrints("8"): |
| 690 | ip.run_cell("amacro") |
| 691 | |
| 692 | class TestMiscTransform(unittest.TestCase): |
| 693 |
nothing calls this directly
no test coverage detected