(self)
| 5200 | self.assertEqual(expected, got.replace(tzinfo=None)) |
| 5201 | |
| 5202 | def test_tzinfo_utcnow(self): |
| 5203 | meth = self.theclass.utcnow |
| 5204 | # Ensure it doesn't require tzinfo (i.e., that this doesn't blow up). |
| 5205 | with self.assertWarns(DeprecationWarning): |
| 5206 | base = meth() |
| 5207 | # Try with and without naming the keyword; for whatever reason, |
| 5208 | # utcnow() doesn't accept a tzinfo argument. |
| 5209 | off42 = FixedOffset(42, "42") |
| 5210 | self.assertRaises(TypeError, meth, off42) |
| 5211 | self.assertRaises(TypeError, meth, tzinfo=off42) |
| 5212 | |
| 5213 | def test_tzinfo_utcfromtimestamp(self): |
| 5214 | import time |
nothing calls this directly
no test coverage detected