Mercurial > cpython-lru_cache-weakref
diff Lib/test/string_tests.py @ 13544:3cf4f5aee00e legacy-trunk
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
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Tue, 11 Jul 2000 20:55:38 +0000 |
| parents | 07c31182f237 |
| children | f7f3be3d00b9 |
line wrap: on
line diff
--- a/Lib/test/string_tests.py Tue Jul 11 20:30:05 2000 +0000 +++ b/Lib/test/string_tests.py Tue Jul 11 20:55:38 2000 +0000 @@ -123,6 +123,9 @@ 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())
