Show More
@@ -3143,7 +3143,7 b' class OSMagics(Magics):' | |||
|
3143 | 3143 | tgt = os.path.expanduser(unquote_filename(parameter_s)) |
|
3144 | 3144 | cwd = os.getcwdu().replace(self.shell.home_dir,'~') |
|
3145 | 3145 | if tgt: |
|
3146 |
self. |
|
|
3146 | self.cd(parameter_s) | |
|
3147 | 3147 | dir_s.insert(0,cwd) |
|
3148 | 3148 | return self.shell.magic('dirs') |
|
3149 | 3149 | |
@@ -3154,7 +3154,7 b' class OSMagics(Magics):' | |||
|
3154 | 3154 | if not self.shell.dir_stack: |
|
3155 | 3155 | raise UsageError("%popd on empty stack") |
|
3156 | 3156 | top = self.shell.dir_stack.pop(0) |
|
3157 |
self. |
|
|
3157 | self.cd(top) | |
|
3158 | 3158 | print "popd ->",top |
|
3159 | 3159 | |
|
3160 | 3160 | @line_magic |
@@ -29,6 +29,8 b' from IPython.utils.tempdir import TemporaryDirectory' | |||
|
29 | 29 | # Test functions begin |
|
30 | 30 | #----------------------------------------------------------------------------- |
|
31 | 31 | |
|
32 | @magic.register_magics | |
|
33 | class DummyMagics(magic.Magics): pass | |
|
32 | 34 | |
|
33 | 35 | def test_rehashx(): |
|
34 | 36 | # clear up everything |
@@ -53,7 +55,7 b' def test_magic_parse_options():' | |||
|
53 | 55 | """Test that we don't mangle paths when parsing magic options.""" |
|
54 | 56 | ip = get_ipython() |
|
55 | 57 | path = 'c:\\x' |
|
56 |
m = |
|
|
58 | m = DummyMagics(ip) | |
|
57 | 59 | opts = m.parse_options('-f %s' % path,'f:')[0] |
|
58 | 60 | # argv splitting is os-dependent |
|
59 | 61 | if os.name == 'posix': |
@@ -287,7 +289,7 b' def test_parse_options():' | |||
|
287 | 289 | """Tests for basic options parsing in magics.""" |
|
288 | 290 | # These are only the most minimal of tests, more should be added later. At |
|
289 | 291 | # the very least we check that basic text/unicode calls work OK. |
|
290 |
m = |
|
|
292 | m = DummyMagics(_ip) | |
|
291 | 293 | nt.assert_equal(m.parse_options('foo', '')[1], 'foo') |
|
292 | 294 | nt.assert_equal(m.parse_options(u'foo', '')[1], u'foo') |
|
293 | 295 |
General Comments 0
You need to be logged in to leave comments.
Login now