summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_largefile.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-05-06 19:48:38 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-05-06 19:48:38 (GMT)
commit77250f4df7a73a5c87d12d781a562747a855cd95 (patch)
tree61f83259cd270f6011c75cbe95d2a25d12c29f87 /Lib/test/test_largefile.py
parent5d8da20dd1034081906dbdffea9c77bf39353dec (diff)
downloadcpython-77250f4df7a73a5c87d12d781a562747a855cd95.zip
cpython-77250f4df7a73a5c87d12d781a562747a855cd95.tar.gz
cpython-77250f4df7a73a5c87d12d781a562747a855cd95.tar.bz2
Added fast alternate io.BytesIO implementation and its test suite.
Removed old test suite for StringIO. Modified truncate() to imply a seek to given argument value.
Diffstat (limited to 'Lib/test/test_largefile.py')
-rw-r--r--Lib/test/test_largefile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py
index 4cafe33..0856346 100644
--- a/Lib/test/test_largefile.py
+++ b/Lib/test/test_largefile.py
@@ -120,14 +120,15 @@ class TestCase(unittest.TestCase):
newsize -= 1
f.seek(42)
f.truncate(newsize)
- self.assertEqual(f.tell(), 42) # else pointer moved
- f.seek(0, 2)
self.assertEqual(f.tell(), newsize) # else wasn't truncated
+ f.seek(0, 2)
+ self.assertEqual(f.tell(), newsize)
# XXX truncate(larger than true size) is ill-defined
# across platform; cut it waaaaay back
f.seek(0)
f.truncate(1)
- self.assertEqual(f.tell(), 0) # else pointer moved
+ self.assertEqual(f.tell(), 1) # else pointer moved
+ f.seek(0)
self.assertEqual(len(f.read()), 1) # else wasn't truncated
def test_main():