Esempio n. 1
0
    def test_farthest(self):
        instance = Time(12, 34, 56)
        t1 = Time(12, 34, 54)
        t2 = Time(12, 34, 59)
        farthest = instance.farthest(t1, t2)
        self.assertEqual(t2, farthest)

        farthest = instance.farthest(t2, t1)
        self.assertEqual(t2, farthest)
Esempio n. 2
0
    def test_farthest_with_time(self):
        instance = Time(12, 34, 56)
        t1 = Time(12, 34, 54)
        t2 = Time(12, 34, 59)
        farthest = instance.farthest(t1, t2)

        self.assertIsInstanceOfTime(farthest)
        self.assertTime(farthest, 12, 34, 59)