示例#1
0
    def test_less_than_with_timezone_false(self):
        d1 = Pendulum(2000, 1, 1, 9, 0, 1, tzinfo='America/Vancouver')
        d2 = Pendulum(2000, 1, 1, 12, 0, 0, tzinfo='America/Toronto')
        d3 = pytz.timezone('America/Toronto').localize(datetime(2000, 1, 1, 12, 0, 0))

        self.assertFalse(d1.lt(d2))
        self.assertFalse(d1.lt(d3))

        self.assertFalse(d1 < d2)
        self.assertFalse(d1 < d3)
示例#2
0
    def test_less_than_false(self):
        d1 = Pendulum(2000, 1, 2)
        d2 = Pendulum(2000, 1, 1)
        d3 = datetime(2000, 1, 1)

        self.assertFalse(d1.lt(d2))
        self.assertFalse(d1.lt(d3))

        self.assertFalse(d1 < d2)
        self.assertFalse(d1 < d3)