Just a little background: This is for a STRIPS like program.
This test keeps returning false, even though it should be true. From what I can see in the debugger it should be true, and I can’t see why it would be returning false.

Thanks for your help.
Debugger image:
World:
def __init__(self):
self.logic = {}
self.actions = {}
self.goals = set()
self.curr_state = set()
Testcase:
def setUp(self):
self.world = World()
def testWorldis_true(self):
pred = "on"
params = ("A", "B")
self.assertFalse(self.world.is_true(pred, params))
self.world.logic[pred] = params
self.assertTrue(self.world.is_true(pred, params))
OUTPUT:
======================================================================
FAIL: testWorldis_true (objorstrippertests.TestWorldFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
File ".stripperAssignment\src\objorstrippertests.py", line 54, in testWorldis_true
self.assertTrue(self.world.is_true(pred, params))
AssertionError: False is not true
Replace:
with:
or even better (maintaining encapsulation!):
logicis a map from a predicate to a set of parameter tuples, not a single parameter tuple.