mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
675e1d0a0d
commit
58c82f0b56
4 changed files with 15 additions and 10 deletions
|
@ -18,25 +18,26 @@ lineno = 0
|
|||
try:
|
||||
xreadlines.xreadlines(Null())[0]
|
||||
except AttributeError, detail:
|
||||
print "AttributeError"
|
||||
print "AttributeError (expected)"
|
||||
else:
|
||||
print "Did not throw attribute error"
|
||||
|
||||
try:
|
||||
xreadlines.xreadlines(XReader)[0]
|
||||
except TypeError, detail:
|
||||
print "TypeError"
|
||||
print "TypeError (expected)"
|
||||
else:
|
||||
print "Did not throw type error"
|
||||
|
||||
try:
|
||||
xreadlines.xreadlines(XReader())[1]
|
||||
except RuntimeError, detail:
|
||||
print "RuntimeError", detail
|
||||
print "RuntimeError (expected):", detail
|
||||
else:
|
||||
print "Did not throw runtime error"
|
||||
|
||||
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
|
||||
if line != xresult[lineno]:
|
||||
print "line %d differs" % lineno
|
||||
lineno += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue