Skip to content

Commit eb0006f

Browse files
committed
Update tags for tests enabled by recent developments
1 parent 0cb0ba7 commit eb0006f

11 files changed

+30
-38
lines changed

test/test_boost.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test01_any_class(self):
2828

2929
assert std.list[any]
3030

31-
@mark.xfail
31+
@mark.skip
3232
def test02_any_usage(self):
3333
"""boost::any assignment and casting"""
3434

@@ -101,7 +101,7 @@ def setup_class(cls):
101101
cppyy.include("boost/variant/variant.hpp")
102102
cppyy.include("boost/variant/get.hpp")
103103

104-
@mark.xfail
104+
@mark.skip
105105
def test01_variant_usage(self):
106106
"""boost::variant usage"""
107107

@@ -130,6 +130,10 @@ class C { }; } """)
130130
assert v.back().which() == 2
131131

132132
assert type(boost.get['BV::A'](v[0])) == cpp.BV.A
133+
134+
# Trying to raise this exception seg faults, by trying to execute an unfit instantiation.
135+
# This comes from `Instantiate` obtaining a single handle and providing a result
136+
# The same issue happens with trying `BestOverloadFunctionMatch` first since the candidate set is single
133137
raises(Exception, boost.get['BV::B'], v[0])
134138
assert type(boost.get['BV::B'](v[1])) == cpp.BV.B
135139
assert type(boost.get['BV::C'](v[2])) == cpp.BV.C

test/test_conversions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test03_error_handling(self):
8787
gc.collect()
8888
assert CC.s_count == 0
8989

90-
@mark.xfail
90+
@mark.xfail(condition = IS_MAC and IS_CLANG_REPL)
9191
def test04_implicit_conversion_from_tuple(self):
9292
"""Allow implicit conversions from tuples as arguments {}-like"""
9393

test/test_cpp11features.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, mark
3-
from .support import setup_make, ispypy, IS_CLANG_REPL, IS_LINUX_ARM
3+
from .support import setup_make, ispypy, IS_CLANG_REPL, IS_LINUX_ARM, IS_MAC
44

55

66
currpath = py.path.local(__file__).dirpath()
@@ -44,7 +44,6 @@ def test01_smart_ptr(self):
4444
gc.collect()
4545
assert TestSmartPtr.s_counter == 0
4646

47-
@mark.xfail(run=False, reason="Crashes")
4847
def test02_smart_ptr_construction(self):
4948
"""Shared/Unique pointer ctor is templated, requiring special care"""
5049

@@ -72,7 +71,6 @@ class C(TestSmartPtr):
7271
gc.collect()
7372
assert TestSmartPtr.s_counter == 0
7473

75-
@mark.xfail(run=False, reason="Crashes")
7674
def test03_smart_ptr_memory_handling(self):
7775
"""Test shared/unique pointer memory ownership"""
7876

@@ -103,7 +101,7 @@ class C(TestSmartPtr):
103101
gc.collect()
104102
assert TestSmartPtr.s_counter == 0
105103

106-
@mark.xfail(run=False, reason="Crashes")
104+
@mark.xfail
107105
def test04_shared_ptr_passing(self):
108106
"""Ability to pass shared_ptr<Derived> through shared_ptr<Base>"""
109107

@@ -409,7 +407,7 @@ def test13_stdhash(self):
409407
assert hash(sw) == 17
410408
assert hash(sw) == 17
411409

412-
@mark.xfail(run=False, reason="Crashes")
410+
@mark.xfail
413411
def test14_shared_ptr_passing(self):
414412
"""Ability to pass normal pointers through shared_ptr by value"""
415413

@@ -435,7 +433,7 @@ def test14_shared_ptr_passing(self):
435433
gc.collect()
436434
assert TestSmartPtr.s_counter == 0
437435

438-
@mark.xfail
436+
@mark.xfail(condition=(IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
439437
def test15_unique_ptr_template_deduction(self):
440438
"""Argument type deduction with std::unique_ptr"""
441439

test/test_crossinheritance.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def get_value(self):
130130
assert c4.m_int == 88
131131
assert CX.IBase2.call_get_value(c4) == 77
132132

133-
@mark.xfail(condition=IS_MAC_ARM, run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon")
133+
@mark.xfail(run=False, condition=IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon")
134134
def test04_arguments(self):
135135
"""Test ability to override functions that take arguments"""
136136

@@ -405,7 +405,6 @@ def call(self):
405405
gc.collect()
406406
assert CB.s_count == 0 + start_count
407407

408-
@mark.xfail(run=False, reason="Crashes")
409408
def test12_python_shared_ptr_memory(self):
410409
"""Usage of Python derived objects with std::shared_ptr"""
411410

@@ -1034,7 +1033,7 @@ def return_const(self):
10341033
assert a.return_const().m_value == "abcdef"
10351034
assert ns.callit(a).m_value == "abcdef"
10361035

1037-
@mark.xfail
1036+
@mark.xfail(condition = IS_MAC and IS_CLANG_REPL)
10381037
def test24_non_copyable(self):
10391038
"""Inheriting from a non-copyable base class"""
10401039

test/test_datatypes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ def run(self, f, buf, total):
12691269
if self.has_byte:
12701270
run(self, cppyy.gbl.sum_byte_data, buf, total)
12711271

1272-
@mark.xfail(run=not(((IS_CLANG_REPL and IS_MAC) or (not IS_CLANG_REPL and IS_MAC))), reason="Crashes")
1272+
@mark.xfail(run=not(IS_MAC), reason="Crashes on OS X")
12731273
def test26_function_pointers(self):
12741274
"""Function pointer passing"""
12751275

@@ -1332,7 +1332,7 @@ def sum_in_python(i1, i2, i3):
13321332
ns = cppyy.gbl.FuncPtrReturn
13331333
assert ns.foo()() == "Hello, World!"
13341334

1335-
@mark.xfail(run=False, condition=(IS_CLANG_REPL and IS_MAC) or (not IS_CLANG_REPL and IS_MAC), reason="Crashes")
1335+
@mark.xfail(run=False, condition=IS_MAC, reason="Crashes")
13361336
def test27_callable_passing(self):
13371337
"""Passing callables through function pointers"""
13381338

@@ -2011,7 +2011,7 @@ class Atom {
20112011
assert b.name == "aap"
20122012
assert b.buf_type == ns.SHAPE
20132013

2014-
@mark.xfail(run=not IS_CLANG_REPL, reason="Crashes")
2014+
@mark.xfail
20152015
def test40_more_aggregates(self):
20162016
"""More aggregate testings (used to fail/report errors)"""
20172017

@@ -2049,7 +2049,6 @@ def test40_more_aggregates(self):
20492049
r2 = ns.make_R2()
20502050
assert r2.s.x == 1
20512051

2052-
@mark.xfail(run=False, reason="Fails")
20532052
def test41_complex_numpy_arrays(self):
20542053
"""Usage of complex numpy arrays"""
20552054

@@ -2097,7 +2096,7 @@ def pycompdot(a, b, N):
20972096
Ccl = func(Acl, Bcl, 2)
20982097
assert complex(Ccl) == pyCcl
20992098

2100-
@mark.xfail
2099+
@mark.xfail(condition=(IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
21012100
def test42_mixed_complex_arithmetic(self):
21022101
"""Mixin of Python and C++ std::complex in arithmetic"""
21032102

test/test_doc_features.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ def pythonize_topologic_printing(klass, name):
10181018

10191019
assert str(s) == "hi there!"
10201020

1021-
@mark.xfail
1021+
@mark.xfail(condition = IS_MAC, reason = "Fails on OS X")
10221022
def test10_llvm_blog(self):
10231023
"""Test code posted in the LLVM blog posting"""
10241024

@@ -1092,6 +1092,7 @@ def setup_class(cls):
10921092

10931093
cppyy.gbl.talk_examples
10941094

1095+
# @mark.skip
10951096
def test_template_instantiation(self):
10961097
"""Run-time template instantiation example"""
10971098

test/test_lowlevel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def test02_builtin_cpp_casts(self):
4747
assert len(ll.reinterpret_cast['int*'](0)) == 0
4848
raises(ReferenceError, ll.reinterpret_cast['int*'](0).__getitem__, 0)
4949

50-
@mark.xfail
5150
def test03_memory(self):
5251
"""Memory allocation and free-ing"""
5352

@@ -681,7 +680,6 @@ def test03_3D_arrays(self):
681680
assert arr[i][j][k] == val
682681
assert arr[i, j, k] == val
683682

684-
@mark.xfail
685683
def test04_malloc(self):
686684
"""Use of malloc to create multi-dim arrays"""
687685

test/test_operators.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, maxvalue, IS_WINDOWS
3+
from .support import setup_make, pylong, maxvalue, IS_WINDOWS, IS_MAC, IS_CLANG_REPL
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("operatorsDict"))
@@ -224,7 +224,6 @@ def test08_call_to_getsetitem_mapping(self):
224224
assert m[1] == 74
225225
assert m(1,2) == 74
226226

227-
@mark.xfail
228227
def test09_templated_operator(self):
229228
"""Templated operator<()"""
230229

@@ -296,7 +295,6 @@ def test11_overloaded_operators(self):
296295

297296
assert v-w == 1-3 + 2-4
298297

299-
@mark.xfail
300298
def test12_unary_operators(self):
301299
"""Unary operator-+~"""
302300

@@ -339,7 +337,7 @@ def test14_single_argument_call(self):
339337
b = ns.Bar()
340338
assert b[42] == 42
341339

342-
@mark.xfail
340+
@mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
343341
def test15_class_and_global_mix(self):
344342
"""Iterator methods have both class and global overloads"""
345343

test/test_regression.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,6 @@ def test36_ctypes_sizeof(self):
10631063

10641064
assert cppyy.sizeof(param) == ctypes.sizeof(param)
10651065

1066-
@mark.xfail
10671066
def test37_array_of_pointers_argument(self):
10681067
"""Passing an array of pointers used to crash"""
10691068

@@ -1089,7 +1088,7 @@ def test37_array_of_pointers_argument(self):
10891088

10901089
assert cppyy.addressof(res) == cppyy.addressof(arr)
10911090

1092-
@mark.xfail(run=not((IS_MAC_ARM or IS_MAC_X86) and not IS_CLANG_REPL))
1091+
@mark.xfail(run = False, condition = (IS_MAC and not IS_CLANG_REPL), reason = "Crashes on OS X Cling")
10931092
def test38_char16_arrays(self):
10941093
"""Access to fixed-size char16 arrays as data members"""
10951094

test/test_stltypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def test09_vector_of_string(self):
442442

443443
raises(TypeError, cppyy.gbl.std.vector["std::string"], "abc")
444444

445-
@mark.xfail
445+
@mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
446446
def test10_vector_std_distance(self):
447447
"""Use of std::distance with vector"""
448448

0 commit comments

Comments
 (0)