Skip to content

Commit 8a34e0f

Browse files
[test] update tags
1 parent f895483 commit 8a34e0f

12 files changed

+23
-48
lines changed

test/test_advancedcpp.py

Lines changed: 2 additions & 3 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, IS_WINDOWS, IS_MAC, IS_LINUX, ispypy, IS_CLANG_REPL, IS_MAC_ARM, IS_MAC_X86, IS_VALGRIND
3+
from .support import setup_make, pylong, IS_WINDOWS, IS_MAC, IS_LINUX, ispypy, IS_CLANG_REPL, IS_MAC_ARM, IS_MAC_X86, IS_VALGRIND, IS_CLING
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("advancedcppDict"))
@@ -688,7 +688,7 @@ def test20_overload_order_with_proper_return(self):
688688
assert cppyy.gbl.overload_one_way().gime() == 1
689689
assert cppyy.gbl.overload_the_other_way().gime() == "aap"
690690

691-
@mark.xfail(run=not IS_VALGRIND, condition = (IS_CLANG_REPL or IS_LINUX), reason="Fails on both Cling and Clang-Repl, Valgrind issue on Clang-Repl")
691+
@mark.xfail(run=not IS_VALGRIND, condition =(IS_LINUX and IS_CLING), reason="Fails on Linux Cling")
692692
def test21_access_to_global_variables(self):
693693
"""Access global_variables_and_pointers"""
694694

@@ -842,7 +842,6 @@ def test26_using_directive(self):
842842
assert cppyy.gbl.UserDirs.bar() == cppyy.gbl.UsedSpace2.bar()
843843
assert cppyy.gbl.UserDirs.foo2() == cppyy.gbl.UsedSpace1.inner.foo2()
844844

845-
@mark.xfail(reason="See https://github.com/compiler-research/CppInterOp/pull/93")
846845
def test27_shadowed_typedef(self):
847846
"""Test that typedefs are not shadowed"""
848847

test/test_boost.py

Lines changed: 2 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.skip
31+
@mark.xfail(run=False)
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.skip
104+
@mark.xfail(run=False)
105105
def test01_variant_usage(self):
106106
"""boost::variant usage"""
107107

test/test_crossinheritance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ def __del__(self):
17201720
del o1
17211721
assert Derived.was_py_deleted == True
17221722

1723-
@mark.xfail
1723+
@mark.xfail(condition=IS_MAC, reason="Fails on OSX")
17241724
def test37_deep_tree(self):
17251725
"""Find overridable methods deep in the tree"""
17261726

test/test_datatypes.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ def test01_instance_data_read_access(self):
192192

193193
c.__destruct__()
194194

195-
@mark.xfail
196195
def test02_instance_data_write_access(self):
197196
"""Test write access to instance public data and verify values"""
198197

@@ -1270,7 +1269,7 @@ def run(self, f, buf, total):
12701269
if self.has_byte:
12711270
run(self, cppyy.gbl.sum_byte_data, buf, total)
12721271

1273-
@mark.xfail(run=not(IS_MAC), reason="Crashes on OS X")
1272+
@mark.xfail(run=False, condition=IS_MAC, reason="Crashes on OSX")
12741273
def test26_function_pointers(self):
12751274
"""Function pointer passing"""
12761275

@@ -2224,7 +2223,6 @@ def test45_const_ref_data(self):
22242223
b = ns.B()
22252224
assert b.body1.name == b.body2.name
22262225

2227-
@mark.xfail
22282226
def test46_small_int_enums(self):
22292227
"""Proper typing of small int enums"""
22302228

@@ -2279,7 +2277,6 @@ def test46_small_int_enums(self):
22792277
assert ns.func_int8() == -1
22802278
assert ns.func_uint8() == 255
22812279

2282-
@mark.xfail
22832280
def test47_hidden_name_enum(self):
22842281
"""Usage of hidden name enum"""
22852282

@@ -2315,7 +2312,6 @@ def test47_hidden_name_enum(self):
23152312
}""")
23162313
#ns.bar(ns.Foo.FOO)
23172314

2318-
@mark.xfail
23192315
def test48_bool_typemap(self):
23202316
"""Test mapping of bool type typedefs"""
23212317

test/test_doc_features.py

Lines changed: 4 additions & 8 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, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLING, IS_CLANG_DEBUG, IS_MAC, IS_MAC_X86, IS_MAC_ARM, IS_LINUX_ARM
3+
from .support import setup_make, ispypy, IS_WINDOWS, IS_CLANG_REPL, IS_CLING, IS_CLANG_DEBUG, IS_MAC, IS_MAC_X86, IS_MAC_ARM, IS_LINUX_ARM, IS_VALGRIND
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("doc_helperDict"))
@@ -249,7 +249,6 @@ def test_keyword_arguments(self):
249249
c = Concrete(**kwds)
250250
assert c.m_int == 18
251251

252-
@mark.xfail
253252
def test_doc_strings(self):
254253
import cppyy
255254
from cppyy.gbl import Concrete
@@ -661,7 +660,7 @@ def test07_run_zoo(self):
661660
assert Zoo.identify_animal(mouse) == "the animal is a mouse"
662661
assert Zoo.identify_animal(lion) == "the animal is a lion"
663662

664-
@mark.xfail
663+
@mark.xfail(condition=IS_MAC, reason="Fails on OSX")
665664
def test08_shared_ptr(self):
666665
"""Shared pointer transparency"""
667666

@@ -687,7 +686,6 @@ def test08_shared_ptr(self):
687686
assert Zoo.identify_animal(Zoo.free_lion) == "the animal is a lion"
688687
assert Zoo.identify_animal_smart(Zoo.free_lion) == "the animal is a lion"
689688

690-
@mark.xfail
691689
def test09_templated_function(self):
692690
"""Templated free function"""
693691

@@ -722,7 +720,7 @@ def test09_templated_function(self):
722720

723721
assert mul['double, double, double'](1., 5) == 5.
724722

725-
@mark.xfail
723+
@mark.xfail(condition=IS_MAC, reason="Fails on OSX")
726724
def test10_stl_algorithm(self):
727725
"""STL algorithm on std::string"""
728726

@@ -763,7 +761,6 @@ def pythonize_A(klass, name):
763761
assert Advert01.A(1)
764762
raises(TypeError, Advert01.A, 1.)
765763

766-
@mark.xfail
767764
def test02_use_c_void_p(self):
768765
"""Use of opaque handles and ctypes.c_void_p"""
769766

@@ -798,7 +795,6 @@ def test02_use_c_void_p(self):
798795
Advert02.Picam_OpenFirstCamera(cam)
799796
assert Advert02.Picam_CloseCamera(cam)
800797

801-
@mark.xfail
802798
def test03_use_of_ctypes_and_enum(self):
803799
"""Use of (opaque) enum through ctypes.c_void_p"""
804800

@@ -1193,7 +1189,7 @@ def f(val):
11931189
assert CC.callPtr(lambda i: 5*i, 4) == 20
11941190
assert CC.callFun(lambda i: 6*i, 4) == 24
11951191

1196-
@mark.xfail
1192+
@mark.xfail(run=False, condition=IS_VALGRIND and IS_LINUX_ARM, reason="Crashes on Valgrind-ARM")
11971193
def test_templated_callback(self):
11981194
"""Templated callback example"""
11991195

test/test_fragile.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def test01_load_failure(self):
2727
except RuntimeError as e:
2828
assert "does_not_exist" in str(e)
2929

30-
@mark.xfail
3130
def test02_missing_classes(self):
3231
"""Test (non-)access to missing classes"""
3332

@@ -39,7 +38,9 @@ def test02_missing_classes(self):
3938
assert cppyy.gbl.fragile == cppyy.gbl.fragile
4039
fragile = cppyy.gbl.fragile
4140

42-
raises(AttributeError, getattr, fragile, "no_such_class")
41+
# FIXME: Should be fixed with root dictionary
42+
# look at https://github.com/wlav/cppyy/discussions/306
43+
# raises(AttributeError, getattr, fragile, "no_such_class")
4344

4445
assert fragile.C is fragile.C
4546
assert fragile.C == fragile.C
@@ -167,7 +168,6 @@ def test09_operator_bool(self):
167168
g = cppyy.gbl.fragile.gI
168169
assert not g
169170

170-
@mark.xfail
171171
def test10_documentation(self):
172172
"""Check contents of documentation"""
173173

@@ -213,7 +213,7 @@ def test10_documentation(self):
213213
except TypeError as e:
214214
assert "cannot instantiate abstract class 'fragile::O'" in str(e)
215215

216-
@mark.xfail
216+
@mark.xfail(condition=IS_MAC, reason="Fails on OSX")
217217
def test11_dir(self):
218218
"""Test __dir__ method"""
219219

@@ -448,7 +448,6 @@ def test17_interactive(self):
448448
finally:
449449
sys.path = oldsp
450450

451-
@mark.xfail
452451
def test18_overload(self):
453452
"""Test usage of __overload__"""
454453

@@ -694,7 +693,6 @@ def test01_stl_in_std(self):
694693
v = cppyy.gbl.vector()
695694
assert cppyy.gbl.vector is not cppyy.gbl.std.vector
696695

697-
@mark.xfail
698696
def test02_ctypes_in_both(self):
699697
"""Standard int types live in both global and std::"""
700698

@@ -708,7 +706,6 @@ def test02_ctypes_in_both(self):
708706
assert cppyy.gbl.std.int8_t(-42) == cppyy.gbl.int8_t(-42)
709707
assert cppyy.gbl.std.uint8_t(42) == cppyy.gbl.uint8_t(42)
710708

711-
@mark.xfail
712709
def test03_clashing_using_in_global(self):
713710
"""Redefines of std:: typedefs should be possible in global"""
714711

test/test_leakcheck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ class MyClass04 {
185185
self.check_func(m, 'method_default', b=-99)
186186
self.check_func(m, 'method_default', c=-99)
187187

188-
@mark.skip(reason="Crashes when run with whole test suite")
189188
def test05_aggregates(self):
190189
"""Leak test of aggregate creation"""
191190

test/test_lowlevel.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ def test13_array_interface(self):
473473
a[0] = 5
474474
assert b[0] == 5
475475

476-
@mark.xfail
477476
def test14_templated_arrays(self):
478477
"""Use of arrays in template types"""
479478

@@ -536,7 +535,6 @@ def setup_class(cls):
536535
def _data_m(self, lbl):
537536
return [('m_'+tp.replace(' ', '_')+lbl, tp) for tp in self.numeric_builtin_types]
538537

539-
@mark.xfail
540538
def test01_2D_arrays(self):
541539
"""Access and use of 2D data members"""
542540

@@ -579,7 +577,6 @@ def test01_2D_arrays(self):
579577
assert arr[i][j] == val
580578
assert arr[i, j] == val
581579

582-
@mark.xfail
583580
def test02_assign_2D_arrays(self):
584581
"""Direct assignment of 2D arrays"""
585582

@@ -632,7 +629,6 @@ def test02_assign_2D_arrays(self):
632629
arr[2][3] = 10
633630
assert arr[2][3] == 10
634631

635-
@mark.xfail
636632
def test03_3D_arrays(self):
637633
"""Access and use of 3D data members"""
638634

test/test_pythonization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setup_class(cls):
1515
import cppyy
1616
cls.pyzables = cppyy.load_reflection_info(cls.test_dct)
1717

18-
@mark.xfail
18+
@mark.xfail(condition=IS_MAC, reason="Fails on OSX")
1919
def test00_api(self):
2020
"""Test basic semantics of the pythonization API"""
2121

test/test_regression.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def test01_kdcraw(self):
4545
assert 'KDcraw' in helptext
4646
assert 'CPPInstance' in helptext
4747

48-
@mark.xfail
4948
def test02_dir(self):
5049
"""For the same reasons as test01_kdcraw, this used to crash."""
5150

@@ -194,7 +193,7 @@ def test07_class_refcounting(self):
194193

195194
assert sys.getrefcount(x) == old_refcnt
196195

197-
@mark.xfail(run=not(IS_MAC and IS_CLING))
196+
@mark.xfail(run=False, condition=IS_MAC and IS_CLING, reason="Crahes on OSX-Cling")
198197
def test08_typedef_identity(self):
199198
"""Nested typedefs should retain identity"""
200199

@@ -357,7 +356,7 @@ class Bar {
357356
f = sds.Foo()
358357
assert f.bar.x == 5
359358

360-
@mark.xfail
359+
@mark.xfail(condition=IS_MAC, reason="Fails on OSX")
361360
def test15_vector_vs_initializer_list(self):
362361
"""Prefer vector in template and initializer_list in formal arguments"""
363362

0 commit comments

Comments
 (0)