(self)
| 2667 | self.assertEqual(self.theclass.fromtimestamp(s), t) |
| 2668 | |
| 2669 | def test_timestamp_aware(self): |
| 2670 | t = self.theclass(1970, 1, 1, tzinfo=timezone.utc) |
| 2671 | self.assertEqual(t.timestamp(), 0.0) |
| 2672 | t = self.theclass(1970, 1, 1, 1, 2, 3, 4, tzinfo=timezone.utc) |
| 2673 | self.assertEqual(t.timestamp(), |
| 2674 | 3600 + 2*60 + 3 + 4*1e-6) |
| 2675 | t = self.theclass(1970, 1, 1, 1, 2, 3, 4, |
| 2676 | tzinfo=timezone(timedelta(hours=-5), 'EST')) |
| 2677 | self.assertEqual(t.timestamp(), |
| 2678 | 18000 + 3600 + 2*60 + 3 + 4*1e-6) |
| 2679 | |
| 2680 | @support.run_with_tz('MSK-03') # Something east of Greenwich |
| 2681 | def test_microsecond_rounding(self): |
nothing calls this directly
no test coverage detected