示例#1
0
def test_fail__valid_port(arg: Any) -> None:
    with pytest.raises(ValidatorError):
        print(valid_port(arg))
示例#2
0
def test_ok__valid_port(arg: Any) -> None:
    value = valid_port(arg)
    assert type(value) == int  # pylint: disable=unidiomatic-typecheck
    assert value == int(str(arg).strip())