mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
small updates to string_join:
use PyString_AS_STRING macro on local string object when resizing string, make sure resized string will always be big enough split string containing error message across two lines add test to string_tests that causes resizing
This commit is contained in:
parent
672fac0d65
commit
88887aa38e
2 changed files with 12 additions and 6 deletions
|
@ -123,6 +123,9 @@ def run_method_tests(test):
|
|||
test('join', '.', u'a.b.c', ['a', u'b', 'c'])
|
||||
test('join', '.', u'a.b.c', ['a', 'b', u'c'])
|
||||
test('join', '.', TypeError, ['a', u'b', 3])
|
||||
for i in [5, 25, 125]:
|
||||
test('join', '-', ((('a' * i) + '-') * i)[:-1],
|
||||
['a' * i] * i)
|
||||
|
||||
test('join', ' ', TypeError, BadSeq1())
|
||||
test('join', ' ', 'a b c', BadSeq2())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue