(self)
| 5387 | self.assertEqual(expected, got.replace(tzinfo=None)) |
| 5388 | |
| 5389 | def test_tzinfo_utcnow(self): |
| 5390 | meth = self.theclass.utcnow |
| 5391 | # Ensure it doesn't require tzinfo (i.e., that this doesn't blow up). |
| 5392 | with self.assertWarns(DeprecationWarning): |
| 5393 | base = meth() |
| 5394 | # Try with and without naming the keyword; for whatever reason, |
| 5395 | # utcnow() doesn't accept a tzinfo argument. |
| 5396 | off42 = FixedOffset(42, "42") |
| 5397 | self.assertRaises(TypeError, meth, off42) |
| 5398 | self.assertRaises(TypeError, meth, tzinfo=off42) |
| 5399 | |
| 5400 | def test_tzinfo_utcfromtimestamp(self): |
| 5401 | import time |
nothing calls this directly
no test coverage detected