Exemple #1
0
def test_cons_equiv():
    a = create(thing, thing2, thing3)
    b = create(thing, thing, thing)
    c = create(thing, thing2, thing3)

    assert RT.equiv.invoke2(a, b) is false
    assert RT.equiv.invoke2(a, c) is true
Exemple #2
0
def test_cons_equiv():
    a = create(thing, thing2, thing3)
    b = create(thing, thing, thing)
    c = create(thing, thing2, thing3)

    assert RT.equiv.invoke2(a, b) is false
    assert RT.equiv.invoke2(a, c) is true
Exemple #3
0
def test_count():
    a = create(thing, thing2, thing3)

    assert isinstance(RT.count.invoke1(a), WInt)
    assert RT.count.invoke1(a)._int_value == 3
Exemple #4
0
def test_hash():
    a = create(thing, thing2, thing3)
    b = create(thing, thing2, thing3)

    assert isinstance(RT.hash.invoke1(a), WInt)
    assert RT.hash.invoke1(a)._int_value == RT.hash.invoke1(b)._int_value
Exemple #5
0
def test_count():
    a = create(thing, thing2, thing3)

    assert isinstance(RT.count.invoke1(a), WInt)
    assert RT.count.invoke1(a)._int_value == 3
Exemple #6
0
def test_hash():
    a = create(thing, thing2, thing3)
    b = create(thing, thing2, thing3)

    assert isinstance(RT.hash.invoke1(a), WInt)
    assert RT.hash.invoke1(a)._int_value == RT.hash.invoke1(b)._int_value