(self)
| 2671 | self.theclass.fromtimestamp(timestamp=time.time()) |
| 2672 | |
| 2673 | def test_utcfromtimestamp(self): |
| 2674 | import time |
| 2675 | |
| 2676 | ts = time.time() |
| 2677 | expected = time.gmtime(ts) |
| 2678 | with self.assertWarns(DeprecationWarning): |
| 2679 | got = self.theclass.utcfromtimestamp(ts) |
| 2680 | self.verify_field_equality(expected, got) |
| 2681 | with self.assertWarns(DeprecationWarning): |
| 2682 | got = self.theclass.utcfromtimestamp(decimal.Decimal(ts)) |
| 2683 | self.verify_field_equality(expected, got) |
| 2684 | with self.assertWarns(DeprecationWarning): |
| 2685 | got = self.theclass.utcfromtimestamp(fractions.Fraction(ts)) |
| 2686 | self.verify_field_equality(expected, got) |
| 2687 | |
| 2688 | # Run with US-style DST rules: DST begins 2 a.m. on second Sunday in |
| 2689 | # March (M3.2.0) and ends 2 a.m. on first Sunday in November (M11.1.0). |
nothing calls this directly
no test coverage detected