diff options
Diffstat (limited to 'Lib/test/test_largefile.py')
-rw-r--r-- | Lib/test/test_largefile.py | 7 |
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(): |