Example #1
0
    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)
Example #2
0
    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)
Example #3
0
 def testXor(self):
     result = FalseObject.call(u"xor", [TrueObject])
     self.assertEqual(result, TrueObject)
Example #4
0
 def testNot(self):
     result = FalseObject.call(u"not", [])
     self.assertEqual(result, TrueObject)
Example #5
0
 def testOpCmp(self):
     result = FalseObject.call(u"op__cmp", [TrueObject])
     self.assertEqual(result.getInt(), -1)
Example #6
0
 def testAnd(self):
     result = FalseObject.call(u"and", [TrueObject])
     self.assertEqual(result, FalseObject)
Example #7
0
 def testXor(self):
     result = FalseObject.call(u"xor", [TrueObject])
     self.assertEqual(result, TrueObject)
Example #8
0
 def testNot(self):
     result = FalseObject.call(u"not", [])
     self.assertEqual(result, TrueObject)
Example #9
0
 def testOpCmp(self):
     result = FalseObject.call(u"op__cmp", [TrueObject])
     self.assertEqual(result.getInt(), -1)
Example #10
0
 def testAnd(self):
     result = FalseObject.call(u"and", [TrueObject])
     self.assertEqual(result, FalseObject)