MCPcopy Create free account
hub / github.com/ipython/ipython / test_store

Function test_store

IPython/core/tests/test_magic.py:1100–1116  ·  view source on GitHub ↗

Test %store.

()

Source from the content-addressed store, hash-verified

1098
1099
1100def test_store():
1101 """Test %store."""
1102 ip = get_ipython()
1103 ip.run_line_magic('load_ext', 'storemagic')
1104
1105 # make sure the storage is empty
1106 ip.run_line_magic('store', '-z')
1107 ip.user_ns['var'] = 42
1108 ip.run_line_magic('store', 'var')
1109 ip.user_ns['var'] = 39
1110 ip.run_line_magic('store', '-r')
1111 nt.assert_equal(ip.user_ns['var'], 42)
1112
1113 ip.run_line_magic('store', '-d var')
1114 ip.user_ns['var'] = 39
1115 ip.run_line_magic('store' , '-r')
1116 nt.assert_equal(ip.user_ns['var'], 39)
1117
1118
1119def _run_edit_test(arg_s, exp_filename=None,

Callers

nothing calls this directly

Calls 2

get_ipythonFunction · 0.90
run_line_magicMethod · 0.80

Tested by

no test coverage detected