Beispiel #1
0
def test_coerce_custom_value_falsy():
    custom_value = coerce_custom_value("False")
    assert custom_value is False
Beispiel #2
0
def test_coerce_custom_value_string():
    custom_value = coerce_custom_value("Foo")
    assert custom_value == "Foo"
Beispiel #3
0
def test_coerce_custom_value_float():
    custom_value = coerce_custom_value("42")
    assert custom_value == 42.0
    assert type(custom_value) == float
Beispiel #4
0
def test_coerce_custom_value_truthy():
    custom_value = coerce_custom_value("True")
    assert custom_value is True
def test_coerce_custom_value_string():
    custom_value = coerce_custom_value("Foo")
    assert custom_value == "Foo"
def test_coerce_custom_value_falsy():
    custom_value = coerce_custom_value("False")
    assert custom_value is False
def test_coerce_custom_value_truthy():
    custom_value = coerce_custom_value("True")
    assert custom_value is True
def test_coerce_custom_value_float():
    custom_value = coerce_custom_value("42")
    assert custom_value == 42.0
    assert type(custom_value) == float
Beispiel #9
0
def test_coerce_custom_value_string():
    custom_value = coerce_custom_value('Foo')
    assert custom_value == 'Foo'