sine-patre/fol/tests/test_kb.py

12 lines
192 B
Python
Raw Permalink Normal View History

2024-04-28 16:23:47 +00:00
import fol
def test_kb_simple():
kb = fol.kb.Kb()
kb.tell('Friend(ALICE, BOB)')
res = kb.ask('Friend(ALICE, x)')
assert len(res) == 1
assert res[0]['x'].value == 'BOB'