Пример #1
0
    def test_date(self):
        n = datetime.date(2011,12,13)

        ret = Date.to_string(n)
        self.assertEquals(ret, n.isoformat())

        dt = Date.from_string(ret)
        self.assertEquals(n, dt)
Пример #2
0
    def test_date(self):
        n = datetime.time(1, 2, 3, 4)

        ret = Date.to_string(n)
        self.assertEquals(ret, n.isoformat())

        dt = Time.from_string(ret)
        self.assertEquals(n, dt)
Пример #3
0
    def test_date(self):
        n = datetime.time(1, 2, 3, 4)

        ret = Date.to_string(n)
        self.assertEquals(ret, n.isoformat())

        dt = Time.from_string(ret)
        self.assertEquals(n, dt)