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