summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_datetime.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-12-29 22:03:38 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-12-29 22:03:38 (GMT)
commit8645a5c81fde0afe0e00e122b64f6bc586844ec3 (patch)
treef6d47e62249f6bfd1dd253deb0b82bb460c4cd65 /Lib/test/test_datetime.py
parentfa1ffb69c48edd7c24918407d8b6b80186463602 (diff)
downloadcpython-8645a5c81fde0afe0e00e122b64f6bc586844ec3.zip
cpython-8645a5c81fde0afe0e00e122b64f6bc586844ec3.tar.gz
cpython-8645a5c81fde0afe0e00e122b64f6bc586844ec3.tar.bz2
#7413: Passing '\0' as the separator to datetime.datetime.isoformat()
used to drop the time part of the result.
Diffstat (limited to 'Lib/test/test_datetime.py')
-rw-r--r--Lib/test/test_datetime.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py
index 1fb3d1b..c5d268f 100644
--- a/Lib/test/test_datetime.py
+++ b/Lib/test/test_datetime.py
@@ -1180,6 +1180,7 @@ class TestDateTime(TestDate):
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")