示例#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