Example #1
0
def test_coerce_custom_value_falsy():
    custom_value = coerce_custom_value("False")
    assert custom_value is False
Example #2
0
def test_coerce_custom_value_string():
    custom_value = coerce_custom_value("Foo")
    assert custom_value == "Foo"
Example #3
0
def test_coerce_custom_value_float():
    custom_value = coerce_custom_value("42")
    assert custom_value == 42.0
    assert type(custom_value) == float
Example #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
Example #9
0
def test_coerce_custom_value_string():
    custom_value = coerce_custom_value('Foo')
    assert custom_value == 'Foo'