예제 #1
0
def test_match_validator_invalid_match():
    with pytest.raises(TypeError):
        # floats is neither a string nor anything 'matchable'
        validators.match_validator(123123.123)
예제 #2
0
def test_match_validator_invalid_match():
    with pytest.raises(TypeError):
        # floats is neither a string nor anything 'matchable'
        validators.match_validator(123123.123)
예제 #3
0
def test_match_validator(match):
    validator = validators.match_validator(match)

    assert validator('foo1980') is None
    with pytest.raises(ValueError):
        validator('bar')
예제 #4
0
def test_match_validator(match):
    validator = validators.match_validator(match)

    assert validator('foo1980') is None
    with pytest.raises(ValueError):
        validator('bar')