예제 #1
0
def test_hash():
    d = Node(TEST_DATA)
    dd = d.clone(new=False)
    assert dd == d
    assert hash(d) == hash(dd)
    assert hash(d) != hash(Node(TEST_DATA))
    dd.set_data(None)
    assert hash(d) != hash(dd)
예제 #2
0
def test_equal():
    d = Node(TEST_DATA)
    dd = d.clone(new=False)
    assert d == dd