def test_AgeRange_different_ranges(range_a, range_b):
    a = loaders.AgeRange(range_a)
    b = loaders.AgeRange(range_b)

    assert hash(a) != hash(b)
    assert a != b
    assert not a == b  # pylint: disable=unneeded-not
Пример #2
0
def test_AgeRange_different_ranges(range_a, range_b):
    a = loaders.AgeRange(range_a)
    b = loaders.AgeRange(range_b)

    assert hash(a) != hash(b)
    assert a != b
    assert not (a == b)
Пример #3
0
def test_AgeRange_str():
    age = "[10,20)"
    a = loaders.AgeRange(age)
    assert str(a) is age
Пример #4
0
def test_AgeRange_equal():
    assert loaders.AgeRange("[10,20)") == loaders.AgeRange("[10,20)")
    assert not loaders.AgeRange("[10,20)") == loaders.AgeRange("[10,21)")
Пример #5
0
def test_AgeRange_hash():
    a = loaders.AgeRange("[10,20)")
    assert hash(a) == hash(a.age_group)
Пример #6
0
def test_AgeRange():
    a = loaders.AgeRange("[10,20)")
    assert a.age_group == "[10,20)"
def test_AgeRange_equal():
    assert loaders.AgeRange("[10,20)") == loaders.AgeRange("[10,20)")
    assert not loaders.AgeRange("[10,20)") == loaders.AgeRange("[10,21)")  # pylint: disable=unneeded-not