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