コード例 #1
0
ファイル: test_date.py プロジェクト: thomasleveil/dateparser
 def test_timestamp_in_microseconds(self):
     self.assertEqual(
         date.get_date_from_timestamp('1570308760263111', None),
         datetime.fromtimestamp(1570308760).replace(microsecond=263111))
コード例 #2
0
ファイル: test_date.py プロジェクト: thomasleveil/dateparser
 def test_timestamp_with_wrong_length(self, date_string):
     self.assertEqual(date.get_date_from_timestamp(date_string, None), None)
コード例 #3
0
ファイル: test_date.py プロジェクト: d10xa/dateparser
 def test_timestamp_in_milliseconds(self):
     self.assertEqual(
         date.get_date_from_timestamp(u'1570308760263', None),
         datetime.utcfromtimestamp(1570308760).replace(microsecond=263000)
     )