mirror of
https://github.com/python/cpython.git
synced 2025-11-07 17:12:03 +00:00
#7413: Passing '\0' as the separator to datetime.datetime.isoformat()
used to drop the time part of the result.
This commit is contained in:
parent
fa1ffb69c4
commit
8645a5c81f
3 changed files with 18 additions and 9 deletions
|
|
@ -1180,6 +1180,7 @@ def test_isoformat(self):
|
|||
self.assertEqual(t.isoformat(), "0002-03-02T04:05:01.000123")
|
||||
self.assertEqual(t.isoformat('T'), "0002-03-02T04:05:01.000123")
|
||||
self.assertEqual(t.isoformat(' '), "0002-03-02 04:05:01.000123")
|
||||
self.assertEqual(t.isoformat('\x00'), "0002-03-02\x0004:05:01.000123")
|
||||
# str is ISO format with the separator forced to a blank.
|
||||
self.assertEqual(str(t), "0002-03-02 04:05:01.000123")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue