Skip to content

Commit

Permalink
skip crashing tests on PyPy and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wlav committed Jun 29, 2022
1 parent 1dc7931 commit b1a4d31
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions test/test_doc_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def test_exceptions(self):
"""Exception throwing and catching"""

if ispypy:
py.test.skip('currently terminates')
py.test.skip('throwing exceptions terminates the process')

import cppyy

Expand All @@ -474,7 +474,7 @@ def test_exceptions(self):
try:
cppyy.gbl.DocHelper.throw_an_error(0)
except exc_type as e:
caught = True
caught = True
assert caught == True
assert caught == True

Expand Down Expand Up @@ -1223,6 +1223,9 @@ def test_autocast_and_identiy(self):
def test_exceptions(self):
"""Exceptions example"""

if ispypy or IS_WINDOWS:
py.test.skip('throwing exceptions from the JIT terminates the process')

import cppyy
import cppyy.gbl.talk_examples as CC

Expand Down
5 changes: 4 additions & 1 deletion test/test_overloads.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises
from .support import setup_make
from .support import setup_make, ispypy, IS_WINDOWS

currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("overloadsDict"))
Expand Down Expand Up @@ -204,6 +204,9 @@ def test09_bool_int_overloads(self):
def test10_overload_and_exceptions(self):
"""Prioritize reporting C++ exceptions from callee"""

if ispypy or IS_WINDOWS:
py.test.skip('throwing exceptions from the JIT terminates the process')

import cppyy

cppyy.cppdef("""\
Expand Down
7 changes: 5 additions & 2 deletions test/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,9 @@ def test34_print_empty_collection(self):
def test35_filesytem(self):
"""Static path object used to crash on destruction"""

if IS_WINDOWS:
py.test.skip('fails due to missing _std_fs_convert_narrow_to_wide symbol')

import cppyy

if cppyy.gbl.gInterpreter.ProcessLine("__cplusplus;") > 201402:
Expand All @@ -1020,13 +1023,13 @@ def test36_ctypes_sizeof(self):
import cppyy, ctypes

cppyy.cppdef("""\
namespace test35_ctypes_sizeof {
namespace test36_ctypes_sizeof {
void func(uint32_t* param) {
*param = 42;
}
}""")

ns = cppyy.gbl.test35_ctypes_sizeof
ns = cppyy.gbl.test36_ctypes_sizeof

holder = ctypes.c_uint32(17)
param = ctypes.pointer(holder)
Expand Down

0 comments on commit b1a4d31

Please sign in to comment.