[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.124,1.125 test_file.py,1.7,1.8 test_mpz.py,1.1,1.2
Neal Norwitz
nnorwitz@users.sourceforge.net
2002年4月01日 10:59:23 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv4080
Modified Files:
test_descr.py test_file.py test_mpz.py
Log Message:
There is no TestError, use TestFailed appropriately
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** test_descr.py 28 Mar 2002 15:49:54 -0000 1.124
--- test_descr.py 1 Apr 2002 18:59:20 -0000 1.125
***************
*** 786,790 ****
try: c()
except TypeError: pass
! else: raise TestError, "calling object w/o call method should raise TypeError"
def pymods():
--- 786,790 ----
try: c()
except TypeError: pass
! else: raise TestFailed, "calling object w/o call method should raise TypeError"
def pymods():
Index: test_file.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_file.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_file.py 1 Apr 2002 00:09:00 -0000 1.7
--- test_file.py 1 Apr 2002 18:59:20 -0000 1.8
***************
*** 2,6 ****
from array import array
! from test_support import verify, TESTFN
from UserList import UserList
--- 2,6 ----
from array import array
! from test_support import verify, TESTFN, TestFailed
from UserList import UserList
***************
*** 71,80 ****
f = open(TESTFN)
if f.name != TESTFN:
! raise TestError, 'file.name should be "%s"' % TESTFN
if f.isatty():
! raise TestError, 'file.isatty() should be false'
if f.closed:
! raise TestError, 'file.closed should be false'
try:
--- 71,80 ----
f = open(TESTFN)
if f.name != TESTFN:
! raise TestFailed, 'file.name should be "%s"' % TESTFN
if f.isatty():
! raise TestFailed, 'file.isatty() should be false'
if f.closed:
! raise TestFailed, 'file.closed should be false'
try:
***************
*** 83,91 ****
pass
else:
! raise TestError, 'file.readinto("") should raise a TypeError'
f.close()
if not f.closed:
! raise TestError, 'file.closed should be true'
for methodname in ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ]:
--- 83,91 ----
pass
else:
! raise TestFailed, 'file.readinto("") should raise a TypeError'
f.close()
if not f.closed:
! raise TestFailed, 'file.closed should be true'
for methodname in ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ]:
***************
*** 96,100 ****
pass
else:
! raise TestError, 'file.%s() on a closed file should raise a ValueError' % methodname
try:
--- 96,100 ----
pass
else:
! raise TestFailed, 'file.%s() on a closed file should raise a ValueError' % methodname
try:
***************
*** 103,107 ****
pass
else:
! raise TestError, 'file.writelines([]) on a closed file should raise a ValueError'
os.unlink(TESTFN)
--- 103,107 ----
pass
else:
! raise TestFailed, 'file.writelines([]) on a closed file should raise a ValueError'
os.unlink(TESTFN)
Index: test_mpz.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mpz.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_mpz.py 1 Apr 2002 01:37:14 -0000 1.1
--- test_mpz.py 1 Apr 2002 18:59:20 -0000 1.2
***************
*** 1,5 ****
import mpz
! from test_support import vereq
def check_conversion(num):
--- 1,5 ----
import mpz
! from test_support import vereq, TestFailed
def check_conversion(num):