[Python-checkins] CVS: python/dist/src/Lib/test test_string.py,1.8,1.9

M.-A. Lemburg python-dev@python.org
Wed, 5 Jul 2000 02:46:28 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17815/Lib/test
Modified Files:
	test_string.py 
Log Message:
Added tests for the new .isalpha() and .isalnum() methods.
Index: test_string.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_string.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** test_string.py	2000年04月11日 15:37:24	1.8
--- test_string.py	2000年07月05日 09:46:26	1.9
***************
*** 85,88 ****
--- 85,103 ----
 test('istitle', 'Not--a Titlecase String', 0)
 
+ test('isalpha', 'a', 1)
+ test('isalpha', 'A', 1)
+ test('isalpha', '\n', 0)
+ test('isalpha', 'abc', 1)
+ test('isalpha', 'aBc123', 0)
+ test('isalpha', 'abc\n', 0)
+ 
+ test('isalnum', 'a', 1)
+ test('isalnum', 'A', 1)
+ test('isalnum', '\n', 0)
+ test('isalnum', '123abc456', 1)
+ test('isalnum', 'a1b3c', 1)
+ test('isalnum', 'aBc000 ', 0)
+ test('isalnum', 'abc\n', 0)
+ 
 test('splitlines', "abc\ndef\n\rghi", ['abc', 'def', '', 'ghi'])
 test('splitlines', "abc\ndef\n\r\nghi", ['abc', 'def', '', 'ghi'])

AltStyle によって変換されたページ (->オリジナル) /