mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Added tests for the new .isalpha() and .isalnum() methods.
This commit is contained in:
parent
f03e74126e
commit
9d4674168f
2 changed files with 31 additions and 0 deletions
|
@ -206,6 +206,22 @@ test('istitle', u'Not a capitalized String', 0)
|
|||
test('istitle', u'Not\ta Titlecase String', 0)
|
||||
test('istitle', u'Not--a Titlecase String', 0)
|
||||
|
||||
test('isalpha', u'a', 1)
|
||||
test('isalpha', u'A', 1)
|
||||
test('isalpha', u'\n', 0)
|
||||
test('isalpha', u'\u1FFc', 1)
|
||||
test('isalpha', u'abc', 1)
|
||||
test('isalpha', u'aBc123', 0)
|
||||
test('isalpha', u'abc\n', 0)
|
||||
|
||||
test('isalnum', u'a', 1)
|
||||
test('isalnum', u'A', 1)
|
||||
test('isalnum', u'\n', 0)
|
||||
test('isalnum', u'123abc456', 1)
|
||||
test('isalnum', u'a1b3c', 1)
|
||||
test('isalnum', u'aBc000 ', 0)
|
||||
test('isalnum', u'abc\n', 0)
|
||||
|
||||
test('splitlines', u"abc\ndef\n\rghi", [u'abc', u'def', u'', u'ghi'])
|
||||
test('splitlines', u"abc\ndef\n\r\nghi", [u'abc', u'def', u'', u'ghi'])
|
||||
test('splitlines', u"abc\ndef\r\nghi", [u'abc', u'def', u'ghi'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue