(self)
| 900 | assert self.calls == [] |
| 901 | |
| 902 | def test_timeit(self): |
| 903 | called = set() |
| 904 | |
| 905 | def f(x): |
| 906 | called.add(x) |
| 907 | |
| 908 | ip.push({"f": f}) |
| 909 | |
| 910 | with tt.AssertPrints("std. dev. of"): |
| 911 | ip.run_line_magic("timeit", "-n1 f(1)") |
| 912 | self.assertEqual(called, {(1,)}) |
| 913 | called.clear() |
| 914 | |
| 915 | with tt.AssertPrints("std. dev. of"): |
| 916 | ip.run_cell_magic("timeit", "-n1 f(2)", "f(3)") |
| 917 | self.assertEqual(called, {(2,), (3,)}) |
| 918 | |
| 919 | |
| 920 | class ErrorTransformer(ast.NodeTransformer): |
nothing calls this directly
no test coverage detected