def test_option():
    kernel = get_kernel()
    d = Dummy(kernel)
    assert 'Options:' in d.line_dummy.__doc__
    assert d.line_dummy.__doc__ in '--size'

    ret = d.call_magic('line', 'dummy', '', 'hey -s400,200')
    assert ret == d
    assert d.foo == 'hey', d.foo
    assert d.size == (400, 200)

    ret = d.call_magic('line', 'dummy', '', 'hey there')
    assert d.foo == 'hey there'

    ret = d.call_magic('line', 'dummy', '', 'range(1, 10)')
    assert d.foo == range(1, 10)

    ret = d.call_magic('line', 'dummy', '', '[1, 2, 3]')
    assert d.foo == [1, 2, 3]

    ret = d.call_magic('line', 'dummy', '', 'hey -l -s400,200')
    assert d.size == (400, 200)
    assert d.foo == "hey -l"

    ret = d.call_magic('line', 'dummy', '', 'hey -s -- -s400,200')
    assert d.size == (400, 200)
    assert d.foo == "hey -s"
dataset/ETHPy150Open Calysto/metakernel/metakernel/tests/test_magic.py/test_option/swapped operands of `in`