[pypy-svn] r78739 - in pypy/branch/fast-forward/lib-python: 2.7.0/test modified-2.7.0/test

afa at codespeak.net afa at codespeak.net
Fri Nov 5 14:17:32 CET 2010


Author: afa
Date: Fri Nov  5 14:17:31 2010
New Revision: 78739

Added:
   pypy/branch/fast-forward/lib-python/modified-2.7.0/test/test_fileio.py
      - copied unchanged from r78737, pypy/branch/fast-forward/lib-python/2.7.0/test/test_fileio.py
Modified:
   pypy/branch/fast-forward/lib-python/2.7.0/test/test_fileio.py
Log:
Oops, don't modify the original test suite.


Modified: pypy/branch/fast-forward/lib-python/2.7.0/test/test_fileio.py
==============================================================================
--- pypy/branch/fast-forward/lib-python/2.7.0/test/test_fileio.py	(original)
+++ pypy/branch/fast-forward/lib-python/2.7.0/test/test_fileio.py	Fri Nov  5 14:17:31 2010
@@ -12,7 +12,6 @@
 
 from test.test_support import TESTFN, check_warnings, run_unittest, make_bad_fd
 from test.test_support import py3k_bytes as bytes
-from test.test_support import gc_collect
 from test.script_helper import run_python
 
 from _io import FileIO as _FileIO
@@ -35,7 +34,6 @@
         self.assertEquals(self.f.tell(), p.tell())
         self.f.close()
         self.f = None
-        gc_collect()
         self.assertRaises(ReferenceError, getattr, p, 'tell')
 
     def testSeekTell(self):
@@ -106,8 +104,8 @@
         self.assertTrue(f.closed)
 
     def testMethods(self):
-        methods = ['fileno', 'isatty', 'read',
-                   'tell', 'truncate', 'seekable',
+        methods = ['fileno', 'isatty', 'read', 'readinto',
+                   'seek', 'tell', 'truncate', 'write', 'seekable',
                    'readable', 'writable']
         if sys.platform.startswith('atheos'):
             methods.remove('truncate')
@@ -119,10 +117,6 @@
             method = getattr(self.f, methodname)
             # should raise on closed file
             self.assertRaises(ValueError, method)
-        # methods with one argument
-        self.assertRaises(ValueError, self.f.readinto, 0)
-        self.assertRaises(ValueError, self.f.write, 0)
-        self.assertRaises(ValueError, self.f.seek, 0)
 
     def testOpendir(self):
         # Issue 3703: opening a directory should fill the errno



More information about the Pypy-commit mailing list