summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/output/test_xreadline8
-rw-r--r--Lib/test/test_xreadline.py11
2 files changed, 10 insertions, 9 deletions
diff --git a/Lib/test/output/test_xreadline b/Lib/test/output/test_xreadline
index 217bca090c..2b84210a5b 100644
--- a/Lib/test/output/test_xreadline
+++ b/Lib/test/output/test_xreadline
@@ -1,4 +1,4 @@
-test_xrl
-AttributeError
-TypeError
-RuntimeError xreadlines object accessed out of order
+test_xreadline
+AttributeError (expected)
+TypeError (expected)
+RuntimeError (expected): xreadlines object accessed out of order
diff --git a/Lib/test/test_xreadline.py b/Lib/test/test_xreadline.py
index 84f7ba42b0..6f2de7e680 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