1
1
import py , os , sys
2
2
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
4
4
5
5
currpath = py .path .local (__file__ ).dirpath ()
6
6
test_dct = str (currpath .join ("doc_helperDict" ))
@@ -249,7 +249,6 @@ def test_keyword_arguments(self):
249
249
c = Concrete (** kwds )
250
250
assert c .m_int == 18
251
251
252
- @mark .xfail
253
252
def test_doc_strings (self ):
254
253
import cppyy
255
254
from cppyy .gbl import Concrete
@@ -661,7 +660,7 @@ def test07_run_zoo(self):
661
660
assert Zoo .identify_animal (mouse ) == "the animal is a mouse"
662
661
assert Zoo .identify_animal (lion ) == "the animal is a lion"
663
662
664
- @mark .xfail
663
+ @mark .xfail ( condition = IS_MAC , reason = "Fails on OSX" )
665
664
def test08_shared_ptr (self ):
666
665
"""Shared pointer transparency"""
667
666
@@ -687,7 +686,6 @@ def test08_shared_ptr(self):
687
686
assert Zoo .identify_animal (Zoo .free_lion ) == "the animal is a lion"
688
687
assert Zoo .identify_animal_smart (Zoo .free_lion ) == "the animal is a lion"
689
688
690
- @mark .xfail
691
689
def test09_templated_function (self ):
692
690
"""Templated free function"""
693
691
@@ -722,7 +720,7 @@ def test09_templated_function(self):
722
720
723
721
assert mul ['double, double, double' ](1. , 5 ) == 5.
724
722
725
- @mark .xfail
723
+ @mark .xfail ( condition = IS_MAC , reason = "Fails on OSX" )
726
724
def test10_stl_algorithm (self ):
727
725
"""STL algorithm on std::string"""
728
726
@@ -763,7 +761,6 @@ def pythonize_A(klass, name):
763
761
assert Advert01 .A (1 )
764
762
raises (TypeError , Advert01 .A , 1. )
765
763
766
- @mark .xfail
767
764
def test02_use_c_void_p (self ):
768
765
"""Use of opaque handles and ctypes.c_void_p"""
769
766
@@ -798,7 +795,6 @@ def test02_use_c_void_p(self):
798
795
Advert02 .Picam_OpenFirstCamera (cam )
799
796
assert Advert02 .Picam_CloseCamera (cam )
800
797
801
- @mark .xfail
802
798
def test03_use_of_ctypes_and_enum (self ):
803
799
"""Use of (opaque) enum through ctypes.c_void_p"""
804
800
@@ -1193,7 +1189,7 @@ def f(val):
1193
1189
assert CC .callPtr (lambda i : 5 * i , 4 ) == 20
1194
1190
assert CC .callFun (lambda i : 6 * i , 4 ) == 24
1195
1191
1196
- @mark .xfail
1192
+ @mark .xfail ( run = False , condition = IS_VALGRIND and IS_LINUX_ARM , reason = "Crashes on Valgrind-ARM" )
1197
1193
def test_templated_callback (self ):
1198
1194
"""Templated callback example"""
1199
1195
0 commit comments