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