mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-132642: document how to render human-readable timedelta
objects (#133825)
This commit is contained in:
parent
76c0b01bc4
commit
efcc42ba70
2 changed files with 19 additions and 0 deletions
|
@ -773,6 +773,9 @@ class TestTimeDelta(HarmlessMixedComparison, unittest.TestCase):
|
|||
microseconds=999999)),
|
||||
"999999999 days, 23:59:59.999999")
|
||||
|
||||
# test the Doc/library/datetime.rst recipe
|
||||
eq(f'-({-td(hours=-1)!s})', "-(1:00:00)")
|
||||
|
||||
def test_repr(self):
|
||||
name = 'datetime.' + self.theclass.__name__
|
||||
self.assertEqual(repr(self.theclass(1)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue