Skip to content

Commit 15f7b5b

Browse files
committed
Update tags, refactors bad conditions
1 parent 813019e commit 15f7b5b

File tree

8 files changed

+17
-20
lines changed

8 files changed

+17
-20
lines changed

test/test_boost.py

Lines changed: 1 addition & 1 deletion
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

test/test_cpp11features.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -143,6 +141,7 @@ def test04_shared_ptr_passing(self):
143141
gc.collect()
144142
assert TestSmartPtr.s_counter == 0
145143

144+
@mark.xfail
146145
def test05_unique_ptr_passing(self):
147146
"""Ability to pass unique_ptr<Derived> through unique_ptr<Base>"""
148147

@@ -408,7 +407,7 @@ def test13_stdhash(self):
408407
assert hash(sw) == 17
409408
assert hash(sw) == 17
410409

411-
@mark.xfail(run=False, reason="Crashes")
410+
@mark.xfail
412411
def test14_shared_ptr_passing(self):
413412
"""Ability to pass normal pointers through shared_ptr by value"""
414413

@@ -434,7 +433,7 @@ def test14_shared_ptr_passing(self):
434433
gc.collect()
435434
assert TestSmartPtr.s_counter == 0
436435

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

test/test_crossinheritance.py

Lines changed: 1 addition & 2 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

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(condition=(IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
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_operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def test14_single_argument_call(self):
337337
b = ns.Bar()
338338
assert b[42] == 42
339339

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

test/test_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def test37_array_of_pointers_argument(self):
10881088

10891089
assert cppyy.addressof(res) == cppyy.addressof(arr)
10901090

1091-
mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
1091+
@mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
10921092
def test38_char16_arrays(self):
10931093
"""Access to fixed-size char16 arrays as data members"""
10941094

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(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
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

test/test_templates.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def test12_template_aliases(self):
316316
assert nsup.Foo
317317
assert nsup.Bar.Foo # used to fail
318318

319-
mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
319+
@mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
320320
def test13_using_templated_method(self):
321321
"""Access to base class templated methods through 'using'"""
322322

@@ -476,7 +476,7 @@ def test18_greedy_overloads(self):
476476
assert g3.get_size(ns.SomeClass()) == cppyy.sizeof(ns.SomeClass)
477477
assert g3.get_size(cppyy.nullptr, True) == -1
478478

479-
mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
479+
@mark.xfail(condition = (IS_MAC and not IS_CLANG_REPL), reason = "Fails on OS X Cling")
480480
def test19_templated_operator_add(self):
481481
"""Templated operator+ is ambiguous: either __pos__ or __add__"""
482482

@@ -614,7 +614,7 @@ def callback(x):
614614

615615
assert cppyy.gbl.std.function['double(std::vector<double>)']
616616

617-
@mark.xfail(run=(IS_MAC_ARM or IS_MAC_X86) and IS_CLANG_REPL)
617+
@mark.xfail(run=(IS_MAC and IS_CLANG_REPL))
618618
def test25_stdfunction_ref_and_ptr_args(self):
619619
"""Use of std::function with reference or pointer args"""
620620

@@ -1119,7 +1119,7 @@ class TNaVU;
11191119
run_n = getattr(cppyy.gbl, 'TNaRun_%d' % n)
11201120
getattr(run_n, t)
11211121

1122-
@mark.xfail(run=not((IS_MAC_ARM or IS_MAC_X86) and not IS_CLANG_REPL))
1122+
@mark.xfail(run=False, condition=not(IS_MAC and not IS_CLANG_REPL), reason="Crashes on OS X + Cling")
11231123
def test33_using_template_argument(self):
11241124
"""`using` type as template argument"""
11251125

0 commit comments

Comments
 (0)