Test that local_ns is actually global_ns when running a cell magic
()
| 468 | nt.assert_equal(ip.user_ns_hidden['_'], 'hohey') |
| 469 | |
| 470 | def test_time_local_ns(): |
| 471 | """ |
| 472 | Test that local_ns is actually global_ns when running a cell magic |
| 473 | """ |
| 474 | ip = get_ipython() |
| 475 | ip.run_cell("%%time\n" |
| 476 | "myvar = 1") |
| 477 | nt.assert_equal(ip.user_ns['myvar'], 1) |
| 478 | del ip.user_ns['myvar'] |
| 479 | |
| 480 | def test_doctest_mode(): |
| 481 | "Toggle doctest_mode twice, it should be a no-op and run without error" |
nothing calls this directly
no test coverage detected