[Python-checkins] CVS: python/dist/src/Lib/test test_xreadline.py,1.1,1.2
Tim Peters
python-dev@python.org
Tue, 09 Jan 2001 15:26:41 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv31420/python/dist/src/Lib/test
Modified Files:
test_xreadline.py
Log Message:
Assorted xreadlines problems:
Wasn't built on Windows; not in config.c either.
Module init function missing DL_EXPORT magic.
test_xreadline output file obviously wrong (started w/ "test_xrl").
test program very unclear about what was expected.
Index: test_xreadline.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_xreadline.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** test_xreadline.py 2001/01/09 21:47:44 1.1
--- test_xreadline.py 2001/01/09 23:26:39 1.2
***************
*** 19,23 ****
xreadlines.xreadlines(Null())[0]
except AttributeError, detail:
! print "AttributeError"
else:
print "Did not throw attribute error"
--- 19,23 ----
xreadlines.xreadlines(Null())[0]
except AttributeError, detail:
! print "AttributeError (expected)"
else:
print "Did not throw attribute error"
***************
*** 26,30 ****
xreadlines.xreadlines(XReader)[0]
except TypeError, detail:
! print "TypeError"
else:
print "Did not throw type error"
--- 26,30 ----
xreadlines.xreadlines(XReader)[0]
except TypeError, detail:
! print "TypeError (expected)"
else:
print "Did not throw type error"
***************
*** 33,37 ****
xreadlines.xreadlines(XReader())[1]
except RuntimeError, detail:
! print "RuntimeError", detail
else:
print "Did not throw runtime error"
--- 33,37 ----
xreadlines.xreadlines(XReader())[1]
except RuntimeError, detail:
! print "RuntimeError (expected):", detail
else:
print "Did not throw runtime error"
***************
*** 39,42 ****
xresult = ['0\n', '1\n', '2\n', '3\n', '0\n', '1\n', '2\n', '0\n', '1\n', '0\n']
for line in xreadlines.xreadlines(XReader()):
! if line != xresult[lineno]: print "line %d differs" % lineno
! lineno = lineno + 1
--- 39,43 ----
xresult = ['0\n', '1\n', '2\n', '3\n', '0\n', '1\n', '2\n', '0\n', '1\n', '0\n']
for line in xreadlines.xreadlines(XReader()):
! if line != xresult[lineno]:
! print "line %d differs" % lineno
! lineno += 1