[Python-checkins] python/dist/src/Lib/test string_tests.py,1.21,1.22
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Thu, 08 Aug 2002 17:43:40 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv19261
Modified Files:
string_tests.py
Log Message:
Revised the test suite for 'contains' to use the test() function argument
rather than vereq(). While it was effectively testing regular strings, it
ignored the test() function argument when called by test_userstring.py.
Index: string_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** string_tests.py 8 Aug 2002 20:19:19 -0000 1.21
--- string_tests.py 9 Aug 2002 00:43:38 -0000 1.22
***************
*** 306,316 ****
def run_contains_tests(test):
! vereq('' in '', True)
! vereq('' in 'abc', True)
! vereq('\0' in 'abc', False)
! vereq('\0' in '\0abc', True)
! vereq('\0' in 'abc\0', True)
! vereq('a' in '\0abc', True)
! vereq('asdf' in 'asdf', True)
! vereq('asdf' in 'asd', False)
! vereq('asdf' in '', False)
--- 306,316 ----
def run_contains_tests(test):
! test('__contains__', '', True, '') # vereq('' in '', True)
! test('__contains__', 'abc', True, '') # vereq('' in 'abc', True)
! test('__contains__', 'abc', False, '\0') # vereq('\0' in 'abc', False)
! test('__contains__', '\0abc', True, '\0') # vereq('\0' in '\0abc', True)
! test('__contains__', 'abc\0', True, '\0') # vereq('\0' in 'abc\0', True)
! test('__contains__', '\0abc', True, 'a') # vereq('a' in '\0abc', True)
! test('__contains__', 'asdf', True, 'asdf') # vereq('asdf' in 'asdf', True)
! test('__contains__', 'asd', False, 'asdf') # vereq('asdf' in 'asd', False)
! test('__contains__', '', False, 'asdf') # vereq('asdf' in '', False)