Пример #1
0
def test_sec_and_nano_from_datetime_with_tz():
    dt = datetime(2013, 8, 17, 12, 20, 13, 123456, AEST())
    seconds, nanoseconds = utils.sec_and_nano_from_datetime(dt)
    assert seconds == 1376706013
    assert nanoseconds == 123456000
Пример #2
0
def test_sec_and_nano_from_datetime_with_tz():
    dt = datetime(2013, 8, 17, 12, 20, 13, 123456, AEST())
    seconds, nanoseconds = utils.sec_and_nano_from_datetime(dt)
    assert seconds == 1376706013
    assert nanoseconds == 123456000
Пример #3
0
 def test_sec_and_nano_from_datetime_with_tz(self):
     dt = datetime.datetime(2013, 8, 17, 12, 20, 13, 123456, AEST())
     seconds, nanoseconds = utils.sec_and_nano_from_datetime(dt)
     self.assertEqual(seconds, 1376706013)
     self.assertEqual(nanoseconds, 123456000)
Пример #4
0
 def test_sec_and_nano_from_datetime_with_tz(self):
     dt = datetime.datetime(2013, 8, 17, 12, 20, 13, 123456, AEST())
     seconds, nanoseconds = utils.sec_and_nano_from_datetime(dt)
     self.assertEqual(seconds, 1376706013)
     self.assertEqual(nanoseconds, 123456000)