예제 #1
0
 def testLessThan(self):
     """
     Test that a simple less-than comparison works.
     """
     t1 = _Task(obj='z', priority=5, count=0)
     t2 = _Task(obj='a', priority=10, count=0)
     self.assertTrue(t1 < t2)
예제 #2
0
 def testAttrs(self):
     """
     Test that the basic attributes set by the _Task class
     actually work.
     """
     obj = 'x'
     priority = 10
     count = 5
     task = _Task(obj=obj, priority=priority, count=count)
     self.assertEqual(obj, task.obj)
     self.assertEqual(priority, task.priority)
     self.assertEqual(count, task.count)