diff --git a/bindings/pyroot/cppyy/cppyy/test/test_regression.py b/bindings/pyroot/cppyy/cppyy/test/test_regression.py index b006195a9cdd7..1838489408581 100644 --- a/bindings/pyroot/cppyy/cppyy/test/test_regression.py +++ b/bindings/pyroot/cppyy/cppyy/test/test_regression.py @@ -473,7 +473,6 @@ class Derived2 : public Base { assert a != b # derived class' C++ operator!= called - @mark.xfail(strict=True) def test18_operator_plus_overloads(self): """operator+(string, string) should return a string""" @@ -485,7 +484,10 @@ def test18_operator_plus_overloads(self): assert a == 'a' assert b == 'b' - assert type(a+b) == cppyy.gbl.std.string + # Expect same return type as other funcs returning a std::string in + # C++, which might be different from gbl.std.string on the Python side + # depending on the enabled Pythonizations. + assert type(a + b) == type(cppyy.gbl.std.to_string(42)) assert a+b == 'ab' def test19_std_string_hash(self): diff --git a/bindings/pyroot/cppyy/cppyy/test/test_templates.py b/bindings/pyroot/cppyy/cppyy/test/test_templates.py index 51ca569e1559e..d3116dafe7893 100644 --- a/bindings/pyroot/cppyy/cppyy/test/test_templates.py +++ b/bindings/pyroot/cppyy/cppyy/test/test_templates.py @@ -1142,7 +1142,6 @@ def test33_using_template_argument(self): assert ns.testptr assert cppyy.gbl.std.vector[ns.testptr] - @mark.xfail(strict=True) def test34_cstring_template_argument(self): """`const char*` use over std::string""" @@ -1160,7 +1159,10 @@ def test34_cstring_template_argument(self): ns = cppyy.gbl.CStringTemplateArg - assert type(ns.stringify("Alice")) == cppyy.gbl.std.string + # Expect same return type as other funcs returning a std::string in + # C++, which might be different from gbl.std.string on the Python side + # depending on the enabled Pythonizations. + assert type(ns.stringify("Alice")) == type(cppyy.gbl.std.to_string(42)) assert ns.stringify("Alice", "Bob") == "Alice Bob " assert ns.stringify(1, 2, 3) == "1 2 3 " assert ns.stringify["const char*"]("Aap") == "Aap "