def test_parse_setoption(self, parser):
    parser.addoption('--hello', dest='hello', action='store')
    parser.addoption('--world', dest='world', default=42)

    class A(object):
        pass
    option = A()
    args = parser.parse_setoption(['--hello', 'world'], option)
    assert (option.hello == 'world')
    assert (option.world == 42)
    assert (not args)
def test_parse_setoption(self, parser):
    parser.addoption('--hello', dest='hello', action='store')
    parser.addoption('--world', dest='world', default=42)

    class A(object):
        pass
    option = A()
    args = parser.parse_setoption(['--hello', 'world'], option)
    assert (option.hello == 'world')
    assert (option.world == 42)
    assert (not args)