From 9c81f11a2a24c8d50d7aa659593dfae138c697b0 Mon Sep 17 00:00:00 2001 From: Vipul Cariappa Date: Tue, 3 Dec 2024 20:13:07 +0530 Subject: [PATCH] [test] update tags fixed by compiler-research/cppyy-backend#116 --- test/test_advancedcpp.py | 1 - test/test_cpp11features.py | 1 - test/test_crossinheritance.py | 2 +- test/test_regression.py | 2 +- test/test_stltypes.py | 17 ++++++++--------- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/test/test_advancedcpp.py b/test/test_advancedcpp.py index da75c1d6..d1b93783 100644 --- a/test/test_advancedcpp.py +++ b/test/test_advancedcpp.py @@ -836,7 +836,6 @@ class Y { y = cppyy.gbl.PrintingNS.Y() assert str(y) == 'Y' - @mark.xfail def test26_using_directive(self): """Test using directive in namespaces""" diff --git a/test/test_cpp11features.py b/test/test_cpp11features.py index 0da398ee..0d1eff8e 100644 --- a/test/test_cpp11features.py +++ b/test/test_cpp11features.py @@ -196,7 +196,6 @@ def test05_unique_ptr_passing(self): gc.collect() assert TestSmartPtr.s_counter == 0 - @mark.xfail def test06_nullptr(self): """Allow the programmer to pass NULL in certain cases""" diff --git a/test/test_crossinheritance.py b/test/test_crossinheritance.py index 9d90335d..1014e92b 100644 --- a/test/test_crossinheritance.py +++ b/test/test_crossinheritance.py @@ -128,7 +128,7 @@ def get_value(self): assert c4.m_int == 88 assert CX.IBase2.call_get_value(c4) == 77 - @mark.xfail(run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon") + @mark.xfail(condition=IS_MAC_ARM, run=not IS_MAC_ARM, reason="Crashes with exception not being caught on Apple Silicon") def test04_arguments(self): """Test ability to override functions that take arguments""" diff --git a/test/test_regression.py b/test/test_regression.py index 912fe8cf..11967c0d 100644 --- a/test/test_regression.py +++ b/test/test_regression.py @@ -684,7 +684,7 @@ def test24_C_style_enum(self): CSE.your_enum = CSE.YourEnum.kFour assert CSE.your_enum == CSE.YourEnum.kFour - @mark.xfail + @mark.xfail(condition=IS_MAC and not IS_CLANG_REPL, reason="Fails with OSX-Cling") def test25_const_iterator(self): """const_iterator failed to resolve the proper return type""" diff --git a/test/test_stltypes.py b/test/test_stltypes.py index ea04ab62..83aa7c25 100644 --- a/test/test_stltypes.py +++ b/test/test_stltypes.py @@ -199,7 +199,6 @@ def setup_class(cls): cls.stltypes = cppyy.load_reflection_info(cls.test_dct) cls.N = cppyy.gbl.N - @mark.xfail def test01_builtin_type_vector_types(self): """Test access to std::vector/std::vector""" @@ -255,7 +254,7 @@ def test01_builtin_type_vector_types(self): assert v.size() == self.N assert len(v) == self.N - @mark.xfail + @mark.xfail(condition=IS_MAC, run=not IS_MAC, reason="Crashes on OSX") def test02_user_type_vector_type(self): """Test access to an std::vector""" @@ -389,7 +388,7 @@ def test06_vector_indexing(self): assert v2[-1] == v[-2] assert v2[self.N-4] == v[-2] - @mark.xfail(run=not((IS_MAC_ARM or IS_MAC_X86) and not IS_CLANG_REPL)) + @mark.xfail(condition=(IS_MAC and not IS_CLANG_REPL), run=not(IS_MAC and not IS_CLANG_REPL), reason="Crashes on OSX") def test07_vector_bool(self): """Usability of std::vector which can be a specialization""" @@ -1040,7 +1039,7 @@ def setup_class(cls): cls.stltypes = cppyy.load_reflection_info(cls.test_dct) cls.N = 13 - @mark.xfail + @mark.xfail(condition=IS_MAC and not IS_CLANG_REPL, reason="Fails with OSX-Cling") def test01_builtin_list_type(self): """Test access to a list""" @@ -1078,7 +1077,7 @@ def test01_builtin_list_type(self): for val in a: assert ll[ll.index(val)] == val - @mark.xfail + @mark.xfail(condition=IS_MAC and not IS_CLANG_REPL, reason="Fails with OSX-Cling") def test02_empty_list_type(self): """Test behavior of empty list""" @@ -1139,7 +1138,7 @@ def test05_list_cpp17_style(self): v = cppyy.gbl.std.list(l) assert list(l) == l - @mark.xfail + @mark.xfail(condition=IS_MAC, reason="Fails with OSX") def test06_convert_list_of_strings(self): """Convert list of strings from C++ to Python types""" @@ -1162,7 +1161,7 @@ def setup_class(cls): cls.stltypes = cppyy.load_reflection_info(cls.test_dct) cls.N = 13 - @mark.xfail + @mark.xfail(condition=not IS_MAC or not IS_CLANG_REPL, reason="Fails on Ubuntu and OSX-cling") def test01_builtin_map_type(self): """Test access to a map""" @@ -1414,7 +1413,7 @@ def test02_STL_like_class_iterators(self): assert len(b) == 3 assert sum(b) == 6 - @mark.xfail + @mark.xfail(condition=not IS_MAC and IS_CLANG_REPL, run=False, reason="Crashes on Ubuntu cling-REPL") def test03_stllike_preinc(self): """STL-like class with preinc by-ref returns""" @@ -1697,7 +1696,7 @@ def setup_class(cls): cls.stltypes = cppyy.load_reflection_info(cls.test_dct) cls.N = cppyy.gbl.N - @mark.xfail + @mark.xfail(condition=IS_MAC and not IS_CLANG_REPL, reason="Fails with OSX-Cling") def test01_set_iteration(self): """Iterate over a set"""