[Python-checkins] python/dist/src/Lib/test test_builtin.py,1.2,1.3 test_b1.py,1.58,NONE test_b2.py,1.38,NONE
doerwalter@users.sourceforge.net
doerwalter@users.sourceforge.net
Sun, 19 Jan 2003 08:24:02 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16923/Lib/test
Modified Files:
test_builtin.py
Removed Files:
test_b1.py test_b2.py
Log Message:
Combine test_b1.py and test_b2.py into test_builtin.py,
port the tests to PyUnit and add many tests for error
cases. This increases code coverage in Python/bltinmodule.c
from 75% to 92%. (From SF patch #662807, with
assert_(not fcmp(x, y)) replaced with assertAlmostEqual(x, y)
where possible)
Index: test_builtin.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_builtin.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_builtin.py 30 Jul 2002 23:26:01 -0000 1.2
--- test_builtin.py 19 Jan 2003 16:23:58 -0000 1.3
***************
*** 1,13 ****
! # Python test set -- part 4, built-in functions
! from test.test_support import unload
! print '4. Built-in functions'
! print 'test_b1'
! unload('test_b1')
! from test import test_b1
[...1063 lines suppressed...]
! self.assertEqual(
! zip(SequenceWithoutALength(), xrange(2**30)),
! list(enumerate(range(5)))
! )
!
! class BadSeq:
! def __getitem__(self, i):
! if i == 5:
! raise ValueError
! else:
! return i
! self.assertRaises(ValueError, zip, BadSeq(), BadSeq())
!
! def test_main():
! suite = unittest.TestSuite()
! suite.addTest(unittest.makeSuite(BuiltinTest))
! test.test_support.run_suite(suite)
!
! if __name__ == "__main__":
! test_main()
--- test_b1.py DELETED ---
--- test_b2.py DELETED ---