[pypy-commit] pypy stdlib-2.7.9: skip some added tests when run against older cpython
bdkearns
noreply at buildbot.pypy.org
Fri Dec 19 00:30:14 CET 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: stdlib-2.7.9
Changeset: r75028:b85da8ff6c09
Date: 2014-12-18 18:29 -0500
http://bitbucket.org/pypy/pypy/changeset/b85da8ff6c09/
Log: skip some added tests when run against older cpython
diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -5,6 +5,7 @@
from pypy.interpreter.error import OperationError
from pypy.interpreter.argument import Arguments
+
class BaseTestCompiler:
def setup_method(self, method):
self.compiler = self.space.createcompiler()
@@ -709,13 +710,13 @@
else:
py.test.fail("Did not raise")
+
class TestECCompiler(BaseTestCompiler):
def setup_method(self, method):
self.compiler = self.space.getexecutioncontext().compiler
class AppTestCompiler:
-
def test_bom_with_future(self):
s = '\xef\xbb\xbffrom __future__ import division\nx = 1/2'
ns = {}
@@ -766,8 +767,8 @@
## def test_try_except_finally(self):
## py.test.skip("unsupported")
+
class AppTestOptimizer:
-
def setup_class(cls):
cls.w_runappdirect = cls.space.wrap(cls.runappdirect)
@@ -920,14 +921,14 @@
sys.stdout = save_stdout
output = s.getvalue()
assert "STOP_CODE" not in output
-
+
def test_optimize_list_comp(self):
source = """def _f(a):
return [x for x in a if None]
"""
exec source
code = _f.func_code
-
+
import StringIO, sys, dis
s = StringIO.StringIO()
out = sys.stdout
@@ -959,7 +960,7 @@
"""
exec source
code = _f.func_code
-
+
import StringIO, sys, dis
s = StringIO.StringIO()
out = sys.stdout
@@ -1039,5 +1040,8 @@
assert eval(code) == u'\xa4'
code = '# -*- coding: iso8859-15 -*-\nu"\xc2\xa4"\n'
assert eval(code) == u'\xc2\u20ac'
+ import sys
+ if sys.version_info < (2, 7, 9):
+ skip()
code = 'u"""\\\n# -*- coding: utf-8 -*-\n\xc2\xa4"""\n'
assert eval(code) == u'# -*- coding: utf-8 -*-\n\xc2\xa4'
diff --git a/pypy/interpreter/test/test_exec.py b/pypy/interpreter/test/test_exec.py
--- a/pypy/interpreter/test/test_exec.py
+++ b/pypy/interpreter/test/test_exec.py
@@ -246,6 +246,9 @@
assert ord(x[0]) == 0x0439
def test_nested_qualified_exec(self):
+ import sys
+ if sys.version_info < (2, 7, 9):
+ skip()
code = ["""
def g():
def f():
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
@@ -194,6 +194,8 @@
def test_group_takes_long(self):
import re
import sys
+ if sys.version_info < (2, 7, 9):
+ skip()
assert re.match("(foo)", "foo").group(1L) == "foo"
exc = raises(IndexError, re.match("", "").group, sys.maxint + 1)
assert str(exc.value) == "no such group"
More information about the pypy-commit
mailing list