()
| 55 | |
| 56 | |
| 57 | def test_autorestore(): |
| 58 | ip.user_ns["foo"] = 95 |
| 59 | ip.run_line_magic("store", "foo") |
| 60 | del ip.user_ns["foo"] |
| 61 | c = Config() |
| 62 | c.StoreMagics.autorestore = False |
| 63 | orig_config = ip.config |
| 64 | try: |
| 65 | ip.config = c |
| 66 | ip.extension_manager.reload_extension("storemagic") |
| 67 | assert "foo" not in ip.user_ns |
| 68 | c.StoreMagics.autorestore = True |
| 69 | ip.extension_manager.reload_extension("storemagic") |
| 70 | assert ip.user_ns["foo"] == 95 |
| 71 | finally: |
| 72 | ip.config = orig_config |
nothing calls this directly
no test coverage detected
searching dependent graphs…