Skip to content

Commit 8a32548

Browse files
committed
add test
1 parent af5cedb commit 8a32548

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_str.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"""
88
import _string
99
import codecs
10+
import datetime
1011
import itertools
1112
import operator
1213
import pickle
@@ -1908,6 +1909,11 @@ def test_utf8_decode_invalid_sequences(self):
19081909
self.assertRaises(UnicodeDecodeError,
19091910
(b'\xF4'+cb+b'\xBF\xBF').decode, 'utf-8')
19101911

1912+
def test_issue127903(self):
1913+
# Issue #127903: segmentation fault in debug mode in ``_copy_characters``
1914+
# when there is nothing to copy.
1915+
self.assertEqual(datetime.datetime(2013, 11, 10, 14, 20, 59).strftime('%z'), '')
1916+
19111917
def test_issue8271(self):
19121918
# Issue #8271: during the decoding of an invalid UTF-8 byte sequence,
19131919
# only the start byte and the continuation byte(s) are now considered

0 commit comments

Comments
 (0)