def evaluate(self, env): ev1 = evaluate(self.v1, env) ev2 = evaluate(self.v2, env) if isinstance(ev1, str) or isinstance(ev2, str): # string comparison needs special-casing if set([ev1, ev2]) == set(["", identifier("Null")]): return True return ev1 == ev2
def testResult(self): self.assertEquals(["ab", "a", "b", identifier("Null")], list(self.pgm.execute()))