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