Update of /projects/cvsroot/python/dist/src/Lib/test In directory eric:/projects/python/develop/guido/src/Lib/test Modified Files: test_contains.py Log Message: Add tests for char in string -- including required exceptions for non-char in string. Index: test_contains.py =================================================================== RCS file: /projects/cvsroot/python/dist/src/Lib/test/test_contains.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** test_contains.py 2000/03/06 21:00:29 1.1 --- test_contains.py 2000/03/07 15:52:01 1.2 *************** *** 40,41 **** --- 40,64 ---- except AttributeError: pass + + # Test char in string + + check('c' in 'abc', "'c' not in 'abc'") + check('d' not in 'abc', "'d' in 'abc'") + + try: + '' in 'abc' + check(0, "'' in 'abc' did not raise error") + except TypeError: + pass + + try: + 'ab' in 'abc' + check(0, "'ab' in 'abc' did not raise error") + except TypeError: + pass + + try: + None in 'abc' + check(0, "None in 'abc' did not raise error") + except TypeError: + pass
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4