Show More
@@ -54,14 +54,14 b' def test_rehashx():' | |||||
54 | _ip.magic('rehashx') |
|
54 | _ip.magic('rehashx') | |
55 | # Practically ALL ipython development systems will have more than 10 aliases |
|
55 | # Practically ALL ipython development systems will have more than 10 aliases | |
56 |
|
56 | |||
57 |
|
|
57 | nt.assert_true(len(_ip.alias_manager.alias_table) > 10) | |
58 | for key, val in _ip.alias_manager.alias_table.iteritems(): |
|
58 | for key, val in _ip.alias_manager.alias_table.iteritems(): | |
59 | # we must strip dots from alias names |
|
59 | # we must strip dots from alias names | |
60 | nt.assert_true('.' not in key) |
|
60 | nt.assert_true('.' not in key) | |
61 |
|
61 | |||
62 | # rehashx must fill up syscmdlist |
|
62 | # rehashx must fill up syscmdlist | |
63 | scoms = _ip.db['syscmdlist'] |
|
63 | scoms = _ip.db['syscmdlist'] | |
64 |
|
|
64 | nt.assert_true(len(scoms) > 10) | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | def test_magic_parse_options(): |
|
67 | def test_magic_parse_options(): | |
@@ -226,9 +226,9 b' def test_magic_magic():' | |||||
226 | ip.magic("magic") |
|
226 | ip.magic("magic") | |
227 |
|
227 | |||
228 | stdout = captured.stdout |
|
228 | stdout = captured.stdout | |
229 |
|
|
229 | nt.assert_true('%magic' in stdout) | |
230 |
|
|
230 | nt.assert_true('IPython' in stdout) | |
231 |
|
|
231 | nt.assert_true('Available' in stdout) | |
232 |
|
232 | |||
233 |
|
233 | |||
234 | @dec.skipif_not_numpy |
|
234 | @dec.skipif_not_numpy | |
@@ -236,9 +236,9 b' def test_numpy_reset_array_undec():' | |||||
236 | "Test '%reset array' functionality" |
|
236 | "Test '%reset array' functionality" | |
237 | _ip.ex('import numpy as np') |
|
237 | _ip.ex('import numpy as np') | |
238 | _ip.ex('a = np.empty(2)') |
|
238 | _ip.ex('a = np.empty(2)') | |
239 |
|
|
239 | nt.assert_true('a' in _ip.user_ns) | |
240 | _ip.magic('reset -f array') |
|
240 | _ip.magic('reset -f array') | |
241 |
|
|
241 | nt.assert_false('a' in _ip.user_ns) | |
242 |
|
242 | |||
243 | def test_reset_out(): |
|
243 | def test_reset_out(): | |
244 | "Test '%reset out' magic" |
|
244 | "Test '%reset out' magic" |
General Comments 0
You need to be logged in to leave comments.
Login now