diff options
author | Eli Bendersky <eliben@gmail.com> | 2012-01-03 04:26:13 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2012-01-03 04:26:13 (GMT) |
commit | 74c503b40d9c40b1a5e7874188f36e067b14356c (patch) | |
tree | 98c491d186343d3a079621c16d3c5a6d08c1cd6f /Lib/test/test_fileio.py | |
parent | c041ab6c7d8fb6c32499c7adbe36bb9b48228c2c (diff) | |
download | cpython-74c503b40d9c40b1a5e7874188f36e067b14356c.zip cpython-74c503b40d9c40b1a5e7874188f36e067b14356c.tar.gz cpython-74c503b40d9c40b1a5e7874188f36e067b14356c.tar.bz2 |
use io.SEEK_* constants instead of os.SEEK_* where an IO stream is seeked, leaving the os.SEEK_* constants only for os.lseek, as documented
Diffstat (limited to 'Lib/test/test_fileio.py')
-rw-r--r-- | Lib/test/test_fileio.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py index 103365d..75db82c 100644 --- a/Lib/test/test_fileio.py +++ b/Lib/test/test_fileio.py @@ -2,6 +2,7 @@ import sys import os +import io import errno import unittest from array import array @@ -334,10 +335,10 @@ class OtherFileTests(unittest.TestCase): self.assertEqual(f.tell(), 10) f.truncate(5) self.assertEqual(f.tell(), 10) - self.assertEqual(f.seek(0, os.SEEK_END), 5) + self.assertEqual(f.seek(0, io.SEEK_END), 5) f.truncate(15) self.assertEqual(f.tell(), 5) - self.assertEqual(f.seek(0, os.SEEK_END), 15) + self.assertEqual(f.seek(0, io.SEEK_END), 15) f.close() def testTruncateOnWindows(self): |