def test_argument_type(self):
    argument = parseopt.Argument('-t', dest='abc', type=int)
    assert (argument.type is int)
    argument = parseopt.Argument('-t', dest='abc', type=str)
    assert (argument.type is str)
    argument = parseopt.Argument('-t', dest='abc', type=float)
    assert (argument.type is float)
    with pytest.warns(DeprecationWarning):
        with pytest.raises(KeyError):
            argument = parseopt.Argument('-t', dest='abc', type='choice')
    argument = parseopt.Argument('-t', dest='abc', type=str, choices=['red', 'blue'])
    assert (argument.type is str)
def test_argument_type(self):
    argument = parseopt.Argument('-t', dest='abc', type=int)
    assert (argument.type is int)
    argument = parseopt.Argument('-t', dest='abc', type=str)
    assert (argument.type is str)
    argument = parseopt.Argument('-t', dest='abc', type=float)
    assert (argument.type is float)
    with pytest.warns(DeprecationWarning):
        with pytest.raises(KeyError):
            argument = parseopt.Argument('-t', dest='abc', type='choice')
    argument = parseopt.Argument('-t', dest='abc', type=str, choices=['red', 'blue'])
    assert (argument.type is str)