def testPick(self): first = Object() second = Object() result = TrueObject.call(u"pick", [first, second]) self.assertTrue(result is first) result = FalseObject.call(u"pick", [first, second]) self.assertTrue(result is second)
def testXor(self): result = FalseObject.call(u"xor", [TrueObject]) self.assertEqual(result, TrueObject)
def testNot(self): result = FalseObject.call(u"not", []) self.assertEqual(result, TrueObject)
def testOpCmp(self): result = FalseObject.call(u"op__cmp", [TrueObject]) self.assertEqual(result.getInt(), -1)
def testAnd(self): result = FalseObject.call(u"and", [TrueObject]) self.assertEqual(result, FalseObject)