[pypy-commit] pypy py3k: Fix test_app_sre when run with -A

amauryfa noreply at buildbot.pypy.org
Sat Oct 20 20:37:44 CEST 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r58278:25dd33767b04
Date: 2012-10-20 20:31 +0200
http://bitbucket.org/pypy/pypy/changeset/25dd33767b04/

Log:	Fix test_app_sre when run with -A

diff --git a/pypy/module/_sre/test/test_app_sre.py b/pypy/module/_sre/test/test_app_sre.py
--- a/pypy/module/_sre/test/test_app_sre.py
+++ b/pypy/module/_sre/test/test_app_sre.py
@@ -197,8 +197,8 @@
         # which (if interpreted literally, as CPython does) gives the
         # following strangeish rules:
         assert isinstance(re.sub("a", "b", "diwoiioamoi"), str)
-        assert isinstance(re.sub("a", "b", b"diwoiiobmoi"), bytes)
-        assert isinstance(re.sub('x', b'y', b'x'), bytes)
+        raises(TypeError, re.sub, "a", "b", b"diwoiiobmoi")
+        raises(TypeError, re.sub, 'x', b'y', b'x')
 
     def test_sub_callable(self):
         import re


More information about the pypy-commit mailing list