Ejemplo n.º 1
0
def test_is_same_object(w_o1=None, w_o2=None):
    if w_o1 is None:
        w_o1 = W_PointersObject(space, None, 0)
    if w_o2 is None:
        w_o2 = w_o1
    assert w_o1.is_same_object(w_o2)
    assert w_o2.is_same_object(w_o1)
Ejemplo n.º 2
0
def test_not_is_same_object(w_o1=None,w_o2=None):
    if w_o1 is None:
        w_o1 = W_PointersObject(space, None, 0)
    if w_o2 is None:
        w_o2 = W_PointersObject(space, None,0)
    assert not w_o1.is_same_object(w_o2)
    assert not w_o2.is_same_object(w_o1)
    w_o2 = W_SmallInteger(2)
    assert not w_o1.is_same_object(w_o2)
    assert not w_o2.is_same_object(w_o1)
    w_o2 = W_Float(5.5)
    assert not w_o1.is_same_object(w_o2)
    assert not w_o2.is_same_object(w_o1)