Exemplo n.º 1
0
def test_str_to_bool_bad_input():
    with pytest.raises(ValueError):
        cu.str_to_bool(1)
Exemplo n.º 2
0
def test_str_to_bool_false():
    assert not cu.str_to_bool('false')
    assert not cu.str_to_bool('False')
    assert not cu.str_to_bool('FALSE')
    assert not cu.str_to_bool('fAlSe')
Exemplo n.º 3
0
def test_str_to_bool_invalid():
    with pytest.raises(ValueError):
        cu.str_to_bool('other')
Exemplo n.º 4
0
def test_str_to_bool_true():
    assert cu.str_to_bool('true')
    assert cu.str_to_bool('True')
    assert cu.str_to_bool('TRUE')
    assert cu.str_to_bool('tRuE')