Show More
@@ -45,28 +45,6 b' def run(tests):' | |||||
45 |
|
45 | |||
46 |
|
46 | |||
47 | def test_handlers(): |
|
47 | def test_handlers(): | |
48 | # alias expansion |
|
|||
49 |
|
||||
50 | # We're using 'true' as our syscall of choice because it doesn't |
|
|||
51 | # write anything to stdout. |
|
|||
52 |
|
||||
53 | # Turn off actual execution of aliases, because it's noisy |
|
|||
54 | old_system_cmd = ip.system |
|
|||
55 | ip.system = lambda cmd: None |
|
|||
56 |
|
||||
57 |
|
||||
58 | ip.alias_manager.alias_table['an_alias'] = (0, 'true') |
|
|||
59 | # These are useful for checking a particular recursive alias issue |
|
|||
60 | ip.alias_manager.alias_table['top'] = (0, 'd:/cygwin/top') |
|
|||
61 | ip.alias_manager.alias_table['d'] = (0, 'true') |
|
|||
62 | run([(i,py3compat.u_format(o)) for i,o in \ |
|
|||
63 | [("an_alias", "get_ipython().system({u}'true ')"), # alias |
|
|||
64 | # Below: recursive aliases should expand whitespace-surrounded |
|
|||
65 | # chars, *not* initial chars which happen to be aliases: |
|
|||
66 | ("top", "get_ipython().system({u}'d:/cygwin/top ')"), |
|
|||
67 | ]]) |
|
|||
68 | ip.system = old_system_cmd |
|
|||
69 |
|
||||
70 | call_idx = CallableIndexable() |
|
48 | call_idx = CallableIndexable() | |
71 | ip.user_ns['call_idx'] = call_idx |
|
49 | ip.user_ns['call_idx'] = call_idx | |
72 |
|
50 |
General Comments 0
You need to be logged in to leave comments.
Login now