Пример #1
0
def test_bool():
    assert bool(_empty) is False
    empty = Empty()
    assert bool(empty) is False
Пример #2
0
def test_id():
    empty1 = Empty()
    assert empty1 is _empty
    assert id(empty1) == id(_empty)
Пример #3
0
def test_neq_empty_dict():
    assert _empty != {}
    empty = Empty()
    assert empty != {}
Пример #4
0
def test_isinstance():
    empty1 = Empty()
    assert isinstance(empty1, Empty)
    assert isinstance(_empty, Empty)
Пример #5
0
def test_neq_empty_list():
    assert _empty != []
    empty = Empty()
    assert empty != []
Пример #6
0
def test_neq_none():
    assert _empty is not None
    empty = Empty()
    assert empty is not None
Пример #7
0
def test_neq_false():
    assert _empty != False
    empty = Empty()
    assert empty != False
Пример #8
0
def test_eq():
    empty = Empty()
    assert empty == _empty
Пример #9
0
def test_len():
    assert len(_empty) == 0
    empty = Empty()
    assert len(empty) == 0