11import py , os , sys
22from 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
55currpath = py .path .local (__file__ ).dirpath ()
66test_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
0 commit comments