Beispiel #1
0
def test_boolean(input, output):
    if inspect.isclass(output):
        with pytest.raises(output):
            misc.boolean(input)
    else:
        assert misc.boolean(input) == output
Beispiel #2
0
 def validate(config, key, value):
     try:
         return boolean(value)
     except ValueError as e:
         raise InvalidConfigOption(value, default) from e
Beispiel #3
0
 def validate(config, key, value):
     try:
         return boolean(value)
     except ValueError as e:
         raise InvalidConfigOption(value, default) from e
Beispiel #4
0
def test_boolean(input, output):
    if inspect.isclass(output):
        with pytest.raises(output):
            misc.boolean(input)
    else:
        assert misc.boolean(input) == output