Ejemplo n.º 1
0
def test_Serialize():
    s = Serialize(123)
    assert '123' in str(s)
    assert s.data == 123

    s = Serialize((1, 2))
    assert str(s)
Ejemplo n.º 2
0
def test_Serialize():
    s = Serialize(123)
    assert "123" in str(s)
    assert s.data == 123

    t = Serialize((1, 2))
    assert str(t)

    u = Serialize(123)
    assert s == u
    assert not (s != u)
    assert s != t
    assert not (s == t)
    assert hash(s) == hash(u)
    assert hash(s) != hash(t)  # most probably