Author: Wim Lavrijsen <[email protected]>
Branch: cppyy-packaging
Changeset: r91927:7480a9a40022
Date: 2017-07-18 16:36 -0700
http://bitbucket.org/pypy/pypy/changeset/7480a9a40022/
Log: remove all cint backend references
diff --git a/pypy/module/_cppyy/test/test_advancedcpp.py
b/pypy/module/_cppyy/test/test_advancedcpp.py
--- a/pypy/module/_cppyy/test/test_advancedcpp.py
+++ b/pypy/module/_cppyy/test/test_advancedcpp.py
@@ -1,11 +1,9 @@
import py, os, sys
-from pypy.module._cppyy import capi
-
-
currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("advancedcppDict.so"))
+
def setup_module(mod):
if sys.platform == 'win32':
py.test.skip("win32 not supported so far")
@@ -19,7 +17,6 @@
def setup_class(cls):
cls.w_test_dct = cls.space.newtext(test_dct)
- cls.w_capi_identity = cls.space.newtext(capi.identify())
cls.w_advanced = cls.space.appexec([], """():
import _cppyy
return _cppyy.load_reflection_info(%r)""" % (test_dct, ))
@@ -538,9 +535,6 @@
assert c1.m_c == 3
c1.destruct()
- if self.capi_identity == 'CINT': # CINT does not support dynamic
casts
- return
-
c2 = _cppyy.gbl.create_c2()
assert type(c2) == _cppyy.gbl.c_class_2
assert c2.m_c == 3
@@ -549,15 +543,6 @@
def test14_new_overloader(self):
"""Verify that class-level overloaded new/delete are called"""
- # TODO: operator new appears to be respected by CINT, but operator
- # delete is not called through root/meta. Anyway, Reflex gets it all
- # wrong (clear from the generated code). Keep this test as it should
- # be all better in the cling/llvm world ...
-
- # TODO: get the capi-identify test selection right ...
- if self.capi_identity != 'CINT': # don't test anything for Reflex
- return
-
import _cppyy
assert _cppyy.gbl.new_overloader.s_instances == 0
@@ -565,9 +550,6 @@
assert _cppyy.gbl.new_overloader.s_instances == 1
nl.destruct()
- if self.capi_identity == 'CINT': # do not test delete
- return
-
import gc
gc.collect()
assert _cppyy.gbl.new_overloader.s_instances == 0
diff --git a/pypy/module/_cppyy/test/test_fragile.py
b/pypy/module/_cppyy/test/test_fragile.py
--- a/pypy/module/_cppyy/test/test_fragile.py
+++ b/pypy/module/_cppyy/test/test_fragile.py
@@ -1,11 +1,9 @@
import py, os, sys
-from pypy.module._cppyy import capi
-
-
currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("fragileDict.so"))
+
def setup_module(mod):
if sys.platform == 'win32':
py.test.skip("win32 not supported so far")
@@ -18,7 +16,6 @@
def setup_class(cls):
cls.w_test_dct = cls.space.newtext(test_dct)
- cls.w_identity = cls.space.newtext(capi.identify())
cls.w_fragile = cls.space.appexec([], """():
import _cppyy
return _cppyy.load_reflection_info(%r)""" % (test_dct, ))
@@ -213,20 +210,13 @@
import _cppyy
- if self.identity == 'CINT': # CINT only support classes on
global space
- members = dir(_cppyy.gbl)
- assert 'TROOT' in members
- assert 'TSystem' in members
- assert 'TClass' in members
- members = dir(_cppyy.gbl.fragile)
- else:
- members = dir(_cppyy.gbl.fragile)
- assert 'A' in members
- assert 'B' in members
- assert 'C' in members
- assert 'D' in members # classes
+ members = dir(_cppyy.gbl.fragile)
+ assert 'A' in members
+ assert 'B' in members
+ assert 'C' in members
+ assert 'D' in members # classes
- assert 'nested1' in members # namespace
+ assert 'nested1' in members # namespace
# TODO: think this through ... probably want this, but interferes with
# the (new) policy of lazy lookups
diff --git a/pypy/module/_cppyy/test/test_zjit.py
b/pypy/module/_cppyy/test/test_zjit.py
--- a/pypy/module/_cppyy/test/test_zjit.py
+++ b/pypy/module/_cppyy/test/test_zjit.py
@@ -8,9 +8,7 @@
from pypy.module._cppyy import interp_cppyy, capi, executor
# These tests are for the backend that support the fast path only.
-if capi.identify() == 'CINT':
- py.test.skip("CINT does not support fast path")
-elif capi.identify() == 'loadable_capi':
+if capi.identify() == 'loadable_capi':
py.test.skip("can not currently use FakeSpace with _cffi_backend")
elif os.getenv("CPPYY_DISABLE_FASTPATH"):
py.test.skip("fast path is disabled by CPPYY_DISABLE_FASTPATH envar")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit