예제 #1
0
def test_lists(goal, query, expected):
    assert [reify(query, st) for st in unfold(goal(initial()))] == expected
예제 #2
0
def test_arithmetic(goal, expected):
    assert [s for s, _, _ in unfold(goal(initial()))] == expected
예제 #3
0
def test_disequality(goal, expected):
    assert [s for s, _, _ in unfold(goal(initial()))] == expected
예제 #4
0
def test_goals(goal, expected):
    assert [s for s, _, _ in unfold(goal(initial()))] == expected
예제 #5
0
def test_unfold(stream, expected):
    assert list(unfold(stream)) == expected