Author: Amaury Forgeot d'Arc <amaur...@gmail.com>
Branch: py3.3
Changeset: r75164:a03e2a0dd546
Date: 2014-12-30 16:14 +0100
http://bitbucket.org/pypy/pypy/changeset/a03e2a0dd546/

Log:    Fix test, like in py3k branch

diff --git a/lib-python/3/test/test_fileio.py b/lib-python/3/test/test_fileio.py
--- a/lib-python/3/test/test_fileio.py
+++ b/lib-python/3/test/test_fileio.py
@@ -128,8 +128,8 @@
         self.assertTrue(f.closed)
 
     def testMethods(self):
-        methods = ['fileno', 'isatty', 'read', 'readinto',
-                   'seek', 'tell', 'truncate', 'write', 'seekable',
+        methods = ['fileno', 'isatty', 'read',
+                   'tell', 'truncate', 'seekable',
                    'readable', 'writable']
 
         self.f.close()
@@ -139,6 +139,10 @@
             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
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to