def test_query(): kb = KnowledgeBase( [ ("i", "like", "cookies"), ("i", "like", "milk"), ("i", "type", "person"), ("i", "type", "living_thing"), ("cookies", "quality", "good"), ] ) assert kb.query("i", "like", "quality") == {"good"}
def test_query(): kb = KnowledgeBase([('i', 'like', 'cookies'), ('i', 'like', 'milk'), ('i', 'type', 'person'), ('i', 'type', 'living_thing'), ('cookies', 'quality', 'good')]) assert kb.query('i', 'like', 'quality') == {'good'}