summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xreadline.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-18 02:22:22 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-18 02:22:22 (GMT)
commitd2bf3b7ca6f702f54b8e81ea8d194fc116ac6791 (patch)
treec34fdd1272160f21e142ecf814d1dd68ff5cfa98 /Lib/test/test_xreadline.py
parentbe4cbb16681ba9274b3017d9ccf3bcb2a2dbc30c (diff)
downloadcpython-d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791.zip
cpython-d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791.tar.gz
cpython-d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791.tar.bz2
Whitespace normalization. Leaving tokenize_tests.py alone for now.
Diffstat (limited to 'Lib/test/test_xreadline.py')
-rw-r--r--Lib/test/test_xreadline.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/Lib/test/test_xreadline.py b/Lib/test/test_xreadline.py
index 6f2de7e..eab8a60 100644
--- a/Lib/test/test_xreadline.py
+++ b/Lib/test/test_xreadline.py
@@ -1,12 +1,12 @@
from test_support import verbose
class XReader:
- def __init__(self):
- self.count = 5
+ def __init__(self):
+ self.count = 5
- def readlines(self, sizehint = None):
- self.count = self.count - 1
- return map(lambda x: "%d\n" % x, range(self.count))
+ def readlines(self, sizehint = None):
+ self.count = self.count - 1
+ return map(lambda x: "%d\n" % x, range(self.count))
class Null: pass
@@ -16,28 +16,28 @@ import xreadlines
lineno = 0
try:
- xreadlines.xreadlines(Null())[0]
+ xreadlines.xreadlines(Null())[0]
except AttributeError, detail:
- print "AttributeError (expected)"
+ print "AttributeError (expected)"
else:
- print "Did not throw attribute error"
+ print "Did not throw attribute error"
try:
- xreadlines.xreadlines(XReader)[0]
+ xreadlines.xreadlines(XReader)[0]
except TypeError, detail:
- print "TypeError (expected)"
+ print "TypeError (expected)"
else:
- print "Did not throw type error"
+ print "Did not throw type error"
try:
- xreadlines.xreadlines(XReader())[1]
+ xreadlines.xreadlines(XReader())[1]
except RuntimeError, detail:
- print "RuntimeError (expected):", detail
+ print "RuntimeError (expected):", detail
else:
- print "Did not throw runtime error"
+ 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 += 1
+ if line != xresult[lineno]:
+ print "line %d differs" % lineno
+ lineno += 1