(self)
| 663 | self.assertEqual(td.microseconds, us) |
| 664 | |
| 665 | def test_total_seconds(self): |
| 666 | td = timedelta(days=365) |
| 667 | self.assertEqual(td.total_seconds(), 31536000.0) |
| 668 | for total_seconds in [123456.789012, -123456.789012, 0.123456, 0, 1e6]: |
| 669 | td = timedelta(seconds=total_seconds) |
| 670 | self.assertEqual(td.total_seconds(), total_seconds) |
| 671 | # Issue8644: Test that td.total_seconds() has the same |
| 672 | # accuracy as td / timedelta(seconds=1). |
| 673 | for ms in [-1, -2, -123]: |
| 674 | td = timedelta(microseconds=ms) |
| 675 | self.assertEqual(td.total_seconds(), td / timedelta(seconds=1)) |
| 676 | |
| 677 | def test_carries(self): |
| 678 | t1 = timedelta(days=100, |
nothing calls this directly
no test coverage detected