From 2241db21b16f790ac51bb057c5ade80f56d09afb Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 21 May 2026 08:56:14 +0200 Subject: [PATCH] [cppyy] Use cppdef for variable in test This fixes test22_cppexec which was marked as xfail if not IS_WINDOWS, which is the opposite of the given reason "Fails on Windows". --- bindings/pyroot/cppyy/cppyy/test/test_fragile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/pyroot/cppyy/cppyy/test/test_fragile.py b/bindings/pyroot/cppyy/cppyy/test/test_fragile.py index 1586e796b9760..ca21f11c9e4e0 100644 --- a/bindings/pyroot/cppyy/cppyy/test/test_fragile.py +++ b/bindings/pyroot/cppyy/cppyy/test/test_fragile.py @@ -544,13 +544,12 @@ def get_errmsg(exc, allspace=allspace): assert "invaliddigit" in err assert "1aap=42;" in err - @mark.xfail(strict=True, condition=not IS_WINDOWS, reason="Fails on Windows") def test22_cppexec(self): """Interactive access to the Cling global scope""" import cppyy - cppyy.cppexec("int interactive_b = 4") + cppyy.cppdef("int interactive_b = 4;") assert cppyy.gbl.interactive_b == 4 with raises(SyntaxError):