()
| 49 | os.rmdir(tmpd) |
| 50 | |
| 51 | def test_autorestore(): |
| 52 | ip.user_ns['foo'] = 95 |
| 53 | ip.magic('store foo') |
| 54 | del ip.user_ns['foo'] |
| 55 | c = Config() |
| 56 | c.StoreMagics.autorestore = False |
| 57 | orig_config = ip.config |
| 58 | try: |
| 59 | ip.config = c |
| 60 | ip.extension_manager.reload_extension('storemagic') |
| 61 | nt.assert_not_in('foo', ip.user_ns) |
| 62 | c.StoreMagics.autorestore = True |
| 63 | ip.extension_manager.reload_extension('storemagic') |
| 64 | nt.assert_equal(ip.user_ns['foo'], 95) |
| 65 | finally: |
| 66 | ip.config = orig_config |
nothing calls this directly
no test coverage detected