Skip to content

Commit b6e1a3f

Browse files
committed
[cppyy] Newly enabled tests in ROOT by CppInterOp [ROOT-patch]
1 parent 34880e6 commit b6e1a3f

13 files changed

Lines changed: 8 additions & 55 deletions

bindings/pyroot/cppyy/cppyy/test/test_advancedcpp.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,13 @@ def test23_using(self):
770770
assert d2.vcheck() == 'A'
771771
assert d2.vcheck(1) == 'B'
772772

773-
@mark.xfail(strict=True)
774773
def test24_typedef_to_private_class(self):
775774
"""Typedefs to private classes should not resolve"""
776775

777776
import cppyy
778777

779778
assert cppyy.gbl.TypedefToPrivateClass().f().m_val == 42
780779

781-
@mark.xfail(strict=True)
782780
def test25_ostream_printing(self):
783781
"""Mapping of __str__ through operator<<(ostream&)"""
784782

@@ -876,7 +874,6 @@ def test27_shadowed_typedef(self):
876874
#assert type(ns.A.Val(1)) == int
877875
#assert type(ns.B.Val(1)) == float
878876

879-
@mark.xfail(strict=True)
880877
def test28_extern_C_in_namespace(self):
881878
"""Access to extern "C" declared functions in namespaces"""
882879

bindings/pyroot/cppyy/cppyy/test/test_concurrent.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def setup_class(cls):
2222

2323
cppyy.gbl.Workers.calc.__release_gil__ = True
2424

25-
@mark.xfail(run=False, reason="Crashes because TClingCallFunc generates wrong code")
2625
def test01_simple_threads(self):
2726
"""Run basic Python threads"""
2827

@@ -41,7 +40,6 @@ def test01_simple_threads(self):
4140
for t in threads:
4241
t.join()
4342

44-
@mark.xfail(run=False, reason="Crashes because the interpreter emits too many warnings")
4543
def test02_futures(self):
4644
"""Run with Python futures"""
4745

@@ -262,7 +260,6 @@ def test():
262260
for t in threads:
263261
t.join()
264262

265-
@mark.xfail(run=False, reason="segmentation violation")
266263
def test07_overload_reuse_in_threads_wo_gil(self):
267264
"""Threads reuse overload objects; check for clashes if no GIL"""
268265

bindings/pyroot/cppyy/cppyy/test/test_cpp11features.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ def test08_initializer_list(self):
300300
for l in (['x'], ['x', 'y', 'z']):
301301
assert ns.foo(l) == std.vector['std::string'](l)
302302

303-
@mark.xfail(strict=True)
304303
def test09_lambda_calls(self):
305304
"""Call (global) lambdas"""
306305

@@ -357,7 +356,6 @@ def test11_chrono(self):
357356
# following used to fail with compilation error
358357
t = std.chrono.system_clock.now() + std.chrono.seconds(1)
359358

360-
@mark.xfail(strict=True)
361359
def test12_stdfunction(self):
362360
"""Use of std::function with arguments in a namespace"""
363361

@@ -545,7 +543,6 @@ def test18_unique_ptr_identity(self):
545543
p2 = c.pget()
546544
assert p1 is p2
547545

548-
@mark.xfail(strict=True)
549546
def test19_smartptr_from_callback(self):
550547
"""Return a smart pointer from a callback"""
551548

bindings/pyroot/cppyy/cppyy/test/test_crossinheritance.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ class MyPyDerived3(VD.MyClass3):
476476
class MyPyDerived4(VD.MyClass4[int]):
477477
pass
478478

479-
@mark.xfail(strict=True)
480479
def test14_protected_access(self):
481480
"""Derived classes should have access to protected members"""
482481

@@ -1021,7 +1020,6 @@ def return_const(self):
10211020
assert a.return_const().m_value == "abcdef"
10221021
assert ns.callit(a).m_value == "abcdef"
10231022

1024-
@mark.xfail(strict=True)
10251023
def test24_non_copyable(self):
10261024
"""Inheriting from a non-copyable base class"""
10271025

@@ -1779,7 +1777,6 @@ def f3(self):
17791777
assert pysub.f3() == "Python: PySub::f3()"
17801778
assert ns.call_fs(pysub) == pysub.f1() + pysub.f2() + pysub.f3()
17811779

1782-
@mark.xfail(strict=True)
17831780
def test38_protected_data(self):
17841781
"""Multiple cross inheritance with protected data"""
17851782

bindings/pyroot/cppyy/cppyy/test/test_datatypes.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def setup_class(cls):
2525
cls.datatypes = cppyy.load_reflection_info(cls.test_dct)
2626
cls.N = cppyy.gbl.N
2727

28-
@mark.xfail(strict=True)
2928
def test01_instance_data_read_access(self):
3029
"""Read access to instance public data and verify values"""
3130

@@ -196,7 +195,6 @@ def test01_instance_data_read_access(self):
196195

197196
c.__destruct__()
198197

199-
@mark.xfail(strict=True)
200198
def test02_instance_data_write_access(self):
201199
"""Test write access to instance public data and verify values"""
202200

@@ -733,7 +731,6 @@ def test10_enum(self):
733731
assert gbl.EnumSpace.AA == 1
734732
assert gbl.EnumSpace.BB == 2
735733

736-
@mark.xfail(strict=True)
737734
def test11_typed_enums(self):
738735
"""Determine correct types of enums"""
739736

@@ -776,7 +773,6 @@ class Test {
776773
assert type(sc.vraioufaux.faux) == bool # no bool as base class
777774
assert isinstance(sc.vraioufaux.faux, bool)
778775

779-
@mark.xfail(strict=True)
780776
def test12_enum_scopes(self):
781777
"""Enum accessibility and scopes"""
782778

@@ -1102,7 +1098,6 @@ def test21_object_validity(self):
11021098

11031099
assert not d2
11041100

1105-
@mark.xfail(strict=True)
11061101
def test22_buffer_shapes(self):
11071102
"""Correctness of declared buffer shapes"""
11081103

@@ -1266,7 +1261,7 @@ def run(self, f, buf, total):
12661261
run(self, cppyy.gbl.sum_uc_data, buf, total)
12671262
run(self, cppyy.gbl.sum_byte_data, buf, total)
12681263

1269-
@mark.xfail(strict=True, run=not IS_MAC and not IS_WINDOWS, reason="Fails on all platforms; crashes on macOS with " \
1264+
@mark.xfail(condition=IS_MAC, run=not IS_MAC and not IS_WINDOWS, reason="Fails on all platforms; crashes on macOS with " \
12701265
"libc++abi: terminating due to uncaught exception")
12711266
def test26_function_pointers(self):
12721267
"""Function pointer passing"""
@@ -1545,7 +1540,6 @@ def test30_multi_dim_arrays_of_builtins(test):
15451540
p = (ctype * len(buf)).from_buffer(buf)
15461541
assert [p[j] for j in range(width*height)] == [2*j for j in range(width*height)]
15471542

1548-
@mark.xfail(strict=True)
15491543
def test31_anonymous_union(self):
15501544
"""Anonymous unions place there fields in the parent scope"""
15511545

@@ -1639,7 +1633,6 @@ def test31_anonymous_union(self):
16391633
assert type(p.data_c[0]) == float
16401634
assert p.intensity == 5.
16411635

1642-
@mark.xfail(strict=True)
16431636
def test32_anonymous_struct(self):
16441637
"""Anonymous struct creates an unnamed type"""
16451638

@@ -1688,7 +1681,6 @@ class Foo2 {
16881681

16891682
assert 'foo' in dir(ns.libuntitled1_ExportedSymbols().kotlin.root.com.justamouse.kmmdemo)
16901683

1691-
@mark.xfail(strict=True)
16921684
def test33_pointer_to_array(self):
16931685
"""Usability of pointer to array"""
16941686

@@ -2049,7 +2041,6 @@ def test40_more_aggregates(self, capfd):
20492041
output = (captured.out + captured.err).lower()
20502042
assert "error:" not in output
20512043

2052-
@mark.xfail(strict=True)
20532044
def test41_complex_numpy_arrays(self, capfd):
20542045
"""Usage of complex numpy arrays"""
20552046

@@ -2233,7 +2224,6 @@ def test45_const_ref_data(self):
22332224
b = ns.B()
22342225
assert b.body1.name == b.body2.name
22352226

2236-
@mark.xfail(strict=True)
22372227
def test46_small_int_enums(self):
22382228
"""Proper typing of small int enums"""
22392229

@@ -2288,7 +2278,6 @@ def test46_small_int_enums(self):
22882278
assert ns.func_int8() == -1
22892279
assert ns.func_uint8() == 255
22902280

2291-
@mark.xfail(strict=True)
22922281
def test47_hidden_name_enum(self):
22932282
"""Usage of hidden name enum"""
22942283

bindings/pyroot/cppyy/cppyy/test/test_doc_features.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,6 @@ def add(self, i):
11231123

11241124
assert v.back().add(17) == 4+42+2*17
11251125

1126-
@mark.xfail(strict=True)
11271126
def test_fallbacks(self):
11281127
"""Template instantation switches based on value sizes"""
11291128

@@ -1168,7 +1167,6 @@ def f(val):
11681167
assert CC.callPtr(lambda i: 5*i, 4) == 20
11691168
assert CC.callFun(lambda i: 6*i, 4) == 24
11701169

1171-
@mark.xfail(strict=True)
11721170
def test_templated_callback(self):
11731171
"""Templated callback example"""
11741172

bindings/pyroot/cppyy/cppyy/test/test_eigen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def test02_comma_insertion(self):
100100
for i in range(5):
101101
assert v(i) == i+1
102102

103-
@mark.xfail(strict=True)
104103
def test03_matrices_and_vectors(self):
105104
"""Matrices and vectors"""
106105

bindings/pyroot/cppyy/cppyy/test/test_lowlevel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def test05_array_as_ref(self):
132132
f = array('f', [0]); ctd.set_float_r(f); assert f[0] == 5.
133133
f = array('d', [0]); ctd.set_double_r(f); assert f[0] == -5.
134134

135-
@mark.xfail(strict=True)
136135
def test06_ctypes_as_ref_and_ptr(self):
137136
"""Use ctypes for pass-by-ref/ptr"""
138137

@@ -489,7 +488,6 @@ def test14_templated_arrays(self):
489488
assert cppyy.gbl.std.vector[cppyy.gbl.std.vector[int]].value_type == 'std::vector<int>'
490489
assert cppyy.gbl.std.vector['int[1]'].value_type == 'int[1]'
491490

492-
@mark.xfail(strict=True)
493491
def test15_templated_arrays_gmpxx(self):
494492
"""Use of gmpxx array types in templates"""
495493

bindings/pyroot/cppyy/cppyy/test/test_numba.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def go_fast(a):
126126
assert (go_fast(x) == go_slow(x)).all()
127127
assert self.compare(go_slow, go_fast, 300000, x)
128128

129-
@mark.xfail(strict=True)
130129
def test02_JITed_template_free_func(self):
131130
"""Numba-JITing of Cling-JITed templated free function"""
132131

@@ -281,7 +280,6 @@ def tma(x):
281280

282281
assert sum == tma(x)
283282

284-
@mark.xfail(strict=True)
285283
def test07_datatype_mapping(self):
286284
"""Numba-JITing of various data types"""
287285

@@ -659,7 +657,8 @@ def np_dot_product(x, y):
659657
assert (njit_res == res)
660658
assert (time_njit < time_np)
661659

662-
@mark.skipif(eigen_path is None, reason="Eigen not found")
660+
# @mark.skipif(eigen_path is None, reason="Eigen not found")
661+
@mark.xfail(run=False, reason="Crashes with Transaction.cpp:98: void cling::Transaction::addNestedTransaction(cling::Transaction*): Assertion `!m_Unloading && 'Must not nest within unloading transaction' failed")
663662
def test14_eigen_numba(self):
664663
"""Numba-JITing of a function that uses a cppyy declared Eigen Vector"""
665664

@@ -743,7 +742,7 @@ def setup_class(cls):
743742
import cppyy
744743
import cppyy.numba_ext
745744

746-
@mark.xfail(strict=True)
745+
@mark.xfail(strict=True, run=False, reason="Crashes with Transaction.cpp:98: void cling::Transaction::addNestedTransaction(cling::Transaction*): Assertion `!m_Unloading && 'Must not nest within unloading transaction' failed")
747746
def test01_templated_freefunction(self):
748747
"""Numba support documentation example: free templated function"""
749748

@@ -772,7 +771,8 @@ def tsa(a):
772771
assert type(tsa(a)) == int
773772
assert tsa(a) == 285
774773

775-
@mark.xfail(strict=True, condition=IS_WINDOWS, reason="Fails on Windows")
774+
# @mark.xfail(strict=True, condition=IS_WINDOWS, reason="Fails on Windows")
775+
@mark.xfail(strict=True, run=False, reason="Crashes with Transaction.cpp:98: void cling::Transaction::addNestedTransaction(cling::Transaction*): Assertion `!m_Unloading && 'Must not nest within unloading transaction' failed")
776776
def test02_class_features(self):
777777
"""Numba support documentation example: class features"""
778778

bindings/pyroot/cppyy/cppyy/test/test_operators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def test08_call_to_getsetitem_mapping(self):
227227
assert m[1] == 74
228228
assert m(1,2) == 74
229229

230-
@mark.xfail(strict=True, reason="Compilation of unused call wrappers emits errors")
231230
def test09_templated_operator(self, capfd):
232231
"""Templated operator<()"""
233232

0 commit comments

Comments
 (0)