[pypy-commit] pypy py3.5: Explicitly skip tests that cannot work with -A
rlamy
pypy.commits at gmail.com
Fri Dec 15 23:05:54 EST 2017
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r93435:88ae8a42ce83
Date: 2017-12-16 04:05 +0000
http://bitbucket.org/pypy/pypy/changeset/88ae8a42ce83/
Log: Explicitly skip tests that cannot work with -A
diff --git a/pypy/objspace/std/test/test_mapdict.py b/pypy/objspace/std/test/test_mapdict.py
--- a/pypy/objspace/std/test/test_mapdict.py
+++ b/pypy/objspace/std/test/test_mapdict.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import pytest
from pypy.objspace.std.test.test_dictmultiobject import FakeSpace, W_DictObject
from pypy.objspace.std.mapdict import *
@@ -884,6 +885,7 @@
assert x.__dict__ == {'日本': 3}
"""
+ at pytest.mark.skipif('config.option.runappdirect')
class AppTestWithMapDictAndCounters(object):
spaceconfig = {"objspace.std.withmethodcachecounter": True}
@@ -1286,7 +1288,7 @@
assert res2 == "foobar"
-
+ at pytest.mark.skipif('config.option.runappdirect')
class AppTestGlobalCaching(AppTestWithMapDict):
spaceconfig = {"objspace.std.withmethodcachecounter": True}
diff --git a/pypy/objspace/std/test/test_methodcache.py b/pypy/objspace/std/test/test_methodcache.py
--- a/pypy/objspace/std/test/test_methodcache.py
+++ b/pypy/objspace/std/test/test_methodcache.py
@@ -1,6 +1,8 @@
+import pytest
from pypy.objspace.std.test import test_typeobject
+ at pytest.mark.skipif('config.option.runappdirect')
class AppTestMethodCaching(test_typeobject.AppTestTypeObject):
spaceconfig = {"objspace.std.withmethodcachecounter": True}
diff --git a/pypy/objspace/std/test/test_prebuiltint.py b/pypy/objspace/std/test/test_prebuiltint.py
--- a/pypy/objspace/std/test/test_prebuiltint.py
+++ b/pypy/objspace/std/test/test_prebuiltint.py
@@ -1,5 +1,7 @@
+import pytest
from pypy.objspace.std.test import test_intobject
+ at pytest.mark.skipif('config.option.runappdirect')
class AppTestInt(test_intobject.AppTestInt):
spaceconfig = {"objspace.std.withprebuiltint": True}
diff --git a/pypy/objspace/std/test/test_smalllongobject.py b/pypy/objspace/std/test/test_smalllongobject.py
--- a/pypy/objspace/std/test/test_smalllongobject.py
+++ b/pypy/objspace/std/test/test_smalllongobject.py
@@ -1,4 +1,4 @@
-import py
+import pytest
import sys
from pypy.objspace.std.smalllongobject import W_SmallLongObject
from pypy.objspace.std.test import test_longobject
@@ -16,7 +16,8 @@
#
assert space.int_w(w5) == 5
if sys.maxint < 0x123456789ABCDEFL:
- py.test.raises(OperationError, space.int_w, wlarge)
+ with pytest.raises(OperationError):
+ space.int_w(wlarge)
else:
assert space.int_w(wlarge) == 0x123456789ABCDEF
#
@@ -44,6 +45,7 @@
assert space.unwrap(w_obj) == 42
+ at pytest.mark.skipif('config.option.runappdirect')
class AppTestSmallLong(test_longobject.AppTestLong):
spaceconfig = {"objspace.std.withsmalllong": True}
More information about the pypy-commit
mailing list