Beispiel #1
0
    def test_to_sec(self):
        init_time = self.init_time
        dt = datetime.datetime(2012, 1, 1, 1, 0, 0, 0)
        expr_sec = _new()._delta_to_sec(dt - init_time)

        init(init_time)
        sec = to_sec(dt)
        self.assertEqual(sec, expr_sec)
Beispiel #2
0
    def test_peer(self):
        init_time = self.init_time
        dt = datetime.datetime(2012, 1, 1, 1, 0, 0, 0)

        init(init_time)
        sec = to_sec(dt)
        expr_dt = to_dt(sec)
        self.assertEqual(dt, expr_dt)