summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_largefile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/test/test_largefile.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/test/test_largefile.py')
-rw-r--r--Lib/test/test_largefile.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py
index d7ed1b3..f4b51ff 100644
--- a/Lib/test/test_largefile.py
+++ b/Lib/test/test_largefile.py
@@ -52,22 +52,22 @@ else:
def expect(got_this, expect_this):
if test_support.verbose:
- print '%r =?= %r ...' % (got_this, expect_this),
+ print('%r =?= %r ...' % (got_this, expect_this), end=' ')
if got_this != expect_this:
if test_support.verbose:
- print 'no'
+ print('no')
raise test_support.TestFailed, 'got %r, but expected %r' %\
(got_this, expect_this)
else:
if test_support.verbose:
- print 'yes'
+ print('yes')
# test that each file function works as expected for a large (i.e. >2GB, do
# we have to check >4GB) files
if test_support.verbose:
- print 'create large file via seek (may be sparse file) ...'
+ print('create large file via seek (may be sparse file) ...')
f = open(name, 'wb')
try:
f.write('z')
@@ -76,16 +76,16 @@ try:
f.write('a')
f.flush()
if test_support.verbose:
- print 'check file size with os.fstat'
+ print('check file size with os.fstat')
expect(os.fstat(f.fileno())[stat.ST_SIZE], size+1)
finally:
f.close()
if test_support.verbose:
- print 'check file size with os.stat'
+ print('check file size with os.stat')
expect(os.stat(name)[stat.ST_SIZE], size+1)
if test_support.verbose:
- print 'play around with seek() and read() with the built largefile'
+ print('play around with seek() and read() with the built largefile')
f = open(name, 'rb')
try:
expect(f.tell(), 0)
@@ -119,7 +119,7 @@ finally:
f.close()
if test_support.verbose:
- print 'play around with os.lseek() with the built largefile'
+ print('play around with os.lseek() with the built largefile')
f = open(name, 'rb')
try:
expect(os.lseek(f.fileno(), 0, 0), 0)
@@ -136,7 +136,7 @@ finally:
if hasattr(f, 'truncate'):
if test_support.verbose:
- print 'try truncate'
+ print('try truncate')
f = open(name, 'r+b')
try:
f.seek(0, 2)