示例#1
0
def test_string_space():
    d = {"hello": "world wide"}
    assert dict_filter(d, "hello", "world wide") is True
示例#2
0
def test_enum_negative():
    d = {"hello": Department.Pharmacy}
    assert dict_filter(d, "hello", Department.Grocery) is False
示例#3
0
def test_enum_freeform():
    d = {"hello": Department.Produce}
    assert dict_filter(d, "hello", "world") is False
示例#4
0
def test_enum():
    d = {"hello": Department.Grocery}
    assert dict_filter(d, "hello", Department.Grocery) is True
示例#5
0
def test_string():
    d = {"hello": "world"}
    assert dict_filter(d, "hello", "world") is True
示例#6
0
def test_float_negative():
    d = {"hello": 2.4}
    assert dict_filter(d, "hello", 2.3) is False
示例#7
0
def test_float():
    d = {"hello": 2.3}
    assert dict_filter(d, "hello", 2.3) is True
示例#8
0
def test_int_negative():
    d = {"hello": 23}
    assert dict_filter(d, "hello", 42) is False
示例#9
0
def test_int():
    d = {"hello": 23}
    assert dict_filter(d, "hello", 23) is True
示例#10
0
def test_string_negative():
    d = {"hello": "mundo"}
    assert dict_filter(d, "hello", "world") is False