Skip to content

Commit 2dd3a87

Browse files
committed
[cppyy] Skip failing tests in test_datatypes.py
Some that are expected to fail should better be skipped, and not run with expected failures. That's because running the failing tests can leave the Python error indicator in an unclear state, which can cause also other subsequent tests to fail that would otherwise pass.
1 parent 8429baa commit 2dd3a87

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test01_instance_data_read_access(self):
192192

193193
c.__destruct__()
194194

195-
@mark.xfail()
195+
@mark.skip()
196196
def test02_instance_data_write_access(self):
197197
"""Test write access to instance public data and verify values"""
198198

@@ -377,7 +377,7 @@ def test03_array_passing(self):
377377

378378
c.__destruct__()
379379

380-
@mark.xfail()
380+
@mark.skip()
381381
def test04_class_read_access(self):
382382
"""Test read access to class public data and verify values"""
383383

@@ -542,7 +542,7 @@ def test06_range_access(self):
542542

543543
c.__destruct__()
544544

545-
@mark.xfail()
545+
@mark.skip()
546546
def test07_type_conversions(self):
547547
"""Test conversions between builtin types"""
548548

@@ -736,7 +736,7 @@ def test10_enum(self):
736736
assert gbl.EnumSpace.AA == 1
737737
assert gbl.EnumSpace.BB == 2
738738

739-
@mark.xfail()
739+
@mark.skip()
740740
def test11_typed_enums(self):
741741
"""Determine correct types of enums"""
742742

@@ -779,7 +779,7 @@ class Test {
779779
assert type(sc.vraioufaux.faux) == bool # no bool as base class
780780
assert isinstance(sc.vraioufaux.faux, bool)
781781

782-
@mark.xfail()
782+
@mark.skip()
783783
def test12_enum_scopes(self):
784784
"""Enum accessibility and scopes"""
785785

@@ -1108,7 +1108,7 @@ def test21_object_validity(self):
11081108

11091109
assert not d2
11101110

1111-
@mark.xfail()
1111+
@mark.skip()
11121112
def test22_buffer_shapes(self):
11131113
"""Correctness of declared buffer shapes"""
11141114

@@ -1560,7 +1560,7 @@ def test30_multi_dim_arrays_of_builtins(test):
15601560
p = (ctype * len(buf)).from_buffer(buf)
15611561
assert [p[j] for j in range(width*height)] == [2*j for j in range(width*height)]
15621562

1563-
@mark.xfail()
1563+
@mark.skip()
15641564
def test31_anonymous_union(self):
15651565
"""Anonymous unions place there fields in the parent scope"""
15661566

@@ -1654,7 +1654,7 @@ def test31_anonymous_union(self):
16541654
assert type(p.data_c[0]) == float
16551655
assert p.intensity == 5.
16561656

1657-
@mark.xfail()
1657+
@mark.skip()
16581658
def test32_anonymous_struct(self):
16591659
"""Anonymous struct creates an unnamed type"""
16601660

@@ -1703,7 +1703,7 @@ class Foo2 {
17031703

17041704
assert 'foo' in dir(ns.libuntitled1_ExportedSymbols().kotlin.root.com.justamouse.kmmdemo)
17051705

1706-
@mark.xfail()
1706+
@mark.skip()
17071707
def test33_pointer_to_array(self):
17081708
"""Usability of pointer to array"""
17091709

@@ -2059,7 +2059,7 @@ def test40_more_aggregates(self):
20592059
r2 = ns.make_R2()
20602060
assert r2.s.x == 1
20612061

2062-
@mark.xfail()
2062+
@mark.skip()
20632063
def test41_complex_numpy_arrays(self):
20642064
"""Usage of complex numpy arrays"""
20652065

@@ -2107,7 +2107,7 @@ def pycompdot(a, b, N):
21072107
Ccl = func(Acl, Bcl, 2)
21082108
assert complex(Ccl) == pyCcl
21092109

2110-
@mark.xfail()
2110+
@mark.skip()
21112111
def test42_mixed_complex_arithmetic(self):
21122112
"""Mixin of Python and C++ std::complex in arithmetic"""
21132113

@@ -2121,7 +2121,7 @@ def test42_mixed_complex_arithmetic(self):
21212121
assert c*(c*c) == p*(p*p)
21222122
assert (c*c)*c == (p*p)*p
21232123

2124-
@mark.xfail()
2124+
@mark.skip()
21252125
def test43_ccharp_memory_handling(self):
21262126
"""cppyy side handled memory of C strings"""
21272127

@@ -2238,7 +2238,7 @@ def test45_const_ref_data(self):
22382238
b = ns.B()
22392239
assert b.body1.name == b.body2.name
22402240

2241-
@mark.xfail()
2241+
@mark.skip()
22422242
def test46_small_int_enums(self):
22432243
"""Proper typing of small int enums"""
22442244

@@ -2293,7 +2293,7 @@ def test46_small_int_enums(self):
22932293
assert ns.func_int8() == -1
22942294
assert ns.func_uint8() == 255
22952295

2296-
@mark.xfail()
2296+
@mark.skip()
22972297
def test47_hidden_name_enum(self):
22982298
"""Usage of hidden name enum"""
22992299

0 commit comments

Comments
 (0)