[Python-checkins] python/dist/src/Lib/test test_unicode.py,1.75,1.76
doerwalter@users.sourceforge.net
doerwalter@users.sourceforge.net
Sun, 19 Jan 2003 08:59:24 -0800
- Previous message: [Python-checkins] python/dist/src/Lib/test/output test_unicode,1.14,NONE
- Next message: [Python-checkins] python/dist/src/Tools/bgen/bgen bgenBuffer.py,1.7,1.8 bgenGenerator.py,1.14,1.15 bgenGeneratorGroup.py,1.6,1.7 bgenHeapBuffer.py,1.3,1.4 bgenModule.py,1.11,1.12 bgenObjectDefinition.py,1.24,1.25 bgenOutput.py,1.4,1.5 bgenStackBuffer.py,1.2,1.3 bgenStringBuffer.py,1.1,1.2 bgenType.py,1.9,1.10 bgenVariable.py,1.1,1.2 macsupport.py,1.28,1.29 scantools.py,1.32,1.33
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv32572/Lib/test
Modified Files:
test_unicode.py
Log Message:
Port test_unicode.py to PyUnit and add tests for error
cases and a few methods. This increases code coverage
in Objects/unicodeobject.c from 81% to 85%.
(From SF patch #662807)
Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** test_unicode.py 8 Jan 2003 23:02:34 -0000 1.75
--- test_unicode.py 19 Jan 2003 16:59:20 -0000 1.76
***************
*** 7,58 ****
"""#"
! from test.test_support import verify, vereq, verbose, TestFailed
! import sys, string
! if not sys.platform.startswith('java'):
! # Test basic sanity of repr()
! verify(repr(u'abc') == "u'abc'")
! verify(repr(u'ab\\c') == "u'ab\\\\c'")
! verify(repr(u'ab\\') == "u'ab\\\\'")
[...1882 lines suppressed...]
!
! def test_slice(self):
! self.checkmethod('__getslice__', u'abc', u'abc', 0, 1000)
! self.checkmethod('__getslice__', u'abc', u'abc', 0, 3)
! self.checkmethod('__getslice__', u'abc', u'ab', 0, 2)
! self.checkmethod('__getslice__', u'abc', u'bc', 1, 3)
! self.checkmethod('__getslice__', u'abc', u'b', 1, 2)
! self.checkmethod('__getslice__', u'abc', u'', 2, 2)
! self.checkmethod('__getslice__', u'abc', u'', 1000, 1000)
! self.checkmethod('__getslice__', u'abc', u'', 2000, 1000)
! self.checkmethod('__getslice__', u'abc', u'', 2, 1)
! # FIXME What about negative indizes? This is handled differently by [] and __getslice__
!
! def test_main():
! suite = unittest.TestSuite()
! suite.addTest(unittest.makeSuite(UnicodeTest))
! test.test_support.run_suite(suite)
!
! if __name__ == "__main__":
! test_main()
- Previous message: [Python-checkins] python/dist/src/Lib/test/output test_unicode,1.14,NONE
- Next message: [Python-checkins] python/dist/src/Tools/bgen/bgen bgenBuffer.py,1.7,1.8 bgenGenerator.py,1.14,1.15 bgenGeneratorGroup.py,1.6,1.7 bgenHeapBuffer.py,1.3,1.4 bgenModule.py,1.11,1.12 bgenObjectDefinition.py,1.24,1.25 bgenOutput.py,1.4,1.5 bgenStackBuffer.py,1.2,1.3 bgenStringBuffer.py,1.1,1.2 bgenType.py,1.9,1.10 bgenVariable.py,1.1,1.2 macsupport.py,1.28,1.29 scantools.py,1.32,1.33
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]