MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_datetime

Method test_datetime

test/test_timestamp.py:38–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 self.assertIsInstance(t, Timestamp)
37
38 def test_datetime(self):
39 d = datetime.datetime(2010, 5, 5, tzinfo=utc)
40 t = Timestamp(d, 0)
41 self.assertEqual(1273017600, t.time)
42 self.assertEqual(d, t.as_datetime())
43
44 def test_datetime_copy_pickle(self):
45 d = datetime.datetime(2010, 5, 5, tzinfo=utc)

Callers

nothing calls this directly

Calls 2

as_datetimeMethod · 0.95
TimestampClass · 0.90

Tested by

no test coverage detected