summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xreadline.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-09 23:26:39 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-09 23:26:39 (GMT)
commit58c82f0b56e79e1682018dbb22fa1afd4f67a464 (patch)
treed4fd55851b0c48994847cba74aab34bb50777094 /Lib/test/test_xreadline.py
parent675e1d0a0dc4b55a63b2d70ed4e501d2a222bb46 (diff)
downloadcpython-58c82f0b56e79e1682018dbb22fa1afd4f67a464.zip
cpython-58c82f0b56e79e1682018dbb22fa1afd4f67a464.tar.gz
cpython-58c82f0b56e79e1682018dbb22fa1afd4f67a464.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_xreadline.py')
-rw-r--r--Lib/test/test_xreadline.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_xreadline.py b/Lib/test/test_xreadline.py
index 84f7ba4..6f2de7e 100644
--- a/Lib/test/test_xreadline.py
+++ b/Lib/test/test_xreadline.py
@@ -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