[pypy-commit] pypy py3.3: Relax a test: with pypy we cannot choose the name of the function when argument parsing fails.

amauryfa pypy.commits at gmail.com
Tue Jan 26 18:10:07 EST 2016


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.3
Changeset: r81959:43daeebf0ab1
Date: 2016-01-26 22:44 +0100
http://bitbucket.org/pypy/pypy/changeset/43daeebf0ab1/

Log:	Relax a test: with pypy we cannot choose the name of the function
	when argument parsing fails.

diff --git a/lib-python/3/test/test_io.py b/lib-python/3/test/test_io.py
--- a/lib-python/3/test/test_io.py
+++ b/lib-python/3/test/test_io.py
@@ -1079,7 +1079,7 @@
 
     def test_args_error(self):
         # Issue #17275
-        with self.assertRaisesRegex(TypeError, "BufferedReader"):
+        with self.assertRaisesRegex(TypeError, "BufferedReader|__init__"):
             self.tp(io.BytesIO(), 1024, 1024, 1024)
 
 
@@ -1386,7 +1386,7 @@
 
     def test_args_error(self):
         # Issue #17275
-        with self.assertRaisesRegex(TypeError, "BufferedWriter"):
+        with self.assertRaisesRegex(TypeError, "BufferedWriter|__init__"):
             self.tp(io.BytesIO(), 1024, 1024, 1024)
 
 
@@ -1779,7 +1779,7 @@
 
     def test_args_error(self):
         # Issue #17275
-        with self.assertRaisesRegex(TypeError, "BufferedRandom"):
+        with self.assertRaisesRegex(TypeError, "BufferedRandom|__init__"):
             self.tp(io.BytesIO(), 1024, 1024, 1024)
 
 


More information about the pypy-commit mailing list