Show More
@@ -541,7 +541,7 b' class Magics(object):' | |||
|
541 | 541 | argv = arg_split(arg_str, posix, strict) |
|
542 | 542 | # Do regular option processing |
|
543 | 543 | try: |
|
544 |
opts,args = getopt(argv,opt_str, |
|
|
544 | opts,args = getopt(argv, opt_str, long_opts) | |
|
545 | 545 | except GetoptError,e: |
|
546 | 546 | raise UsageError('%s ( allowed: "%s" %s)' % (e.msg,opt_str, |
|
547 | 547 | " ".join(long_opts))) |
@@ -69,6 +69,15 b' def test_magic_parse_options():' | |||
|
69 | 69 | expected = path |
|
70 | 70 | nt.assert_equals(opts['f'], expected) |
|
71 | 71 | |
|
72 | def test_magic_parse_long_options(): | |
|
73 | """Magic.parse_options can handle --foo=bar long options""" | |
|
74 | ip = get_ipython() | |
|
75 | m = DummyMagics(ip) | |
|
76 | opts, _ = m.parse_options('--foo --bar=bubble', 'a', 'foo', 'bar=') | |
|
77 | nt.assert_true('foo' in opts) | |
|
78 | nt.assert_true('bar' in opts) | |
|
79 | nt.assert_true(opts['bar'], "bubble") | |
|
80 | ||
|
72 | 81 | |
|
73 | 82 | @dec.skip_without('sqlite3') |
|
74 | 83 | def doctest_hist_f(): |
General Comments 0
You need to be logged in to leave comments.
Login now