summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-07-05 09:46:40 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2000-07-05 09:46:40 (GMT)
commit9d4674168fa41b9b9e1968b69f42681ce61ca610 (patch)
tree0e24fac1d62469ae27a51962972bef4b2929189b /Lib/test/test_unicode.py
parentf03e74126e5702edab33148140e84d21471424ce (diff)
downloadcpython-9d4674168fa41b9b9e1968b69f42681ce61ca610.zip
cpython-9d4674168fa41b9b9e1968b69f42681ce61ca610.tar.gz
cpython-9d4674168fa41b9b9e1968b69f42681ce61ca610.tar.bz2
Added tests for the new .isalpha() and .isalnum() methods.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 85d0bca..ec894ed 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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'])