aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2023-02-08 15:17:00 +0100
committerChristian Tismer <tismer@stackless.com>2023-02-13 09:27:05 +0100
commitf09dc73e54c9ec9ddcb790b7b3ad986cc3686459 (patch)
tree5fd7f09b027210eab293276ca9c7bb1de372e266 /sources/pyside6
parent67f2a02dbbec765d69c1a43031e75b9eb0118a4d (diff)
testing: make multiple_feature_test.py less verbose
The test writes out very much when there is any error happening in CI. With NoGIL, this becomes very boring. It now only prints if the "-v" flag is given. Task-number: PYSIDE-2221 Change-Id: I511b1fd56407a875797cfec958f5e0beff42f7a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/tests/QtCore/multiple_feature_test.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/sources/pyside6/tests/QtCore/multiple_feature_test.py b/sources/pyside6/tests/QtCore/multiple_feature_test.py
index d9f4bb8b2..4b6b05664 100644
--- a/sources/pyside6/tests/QtCore/multiple_feature_test.py
+++ b/sources/pyside6/tests/QtCore/multiple_feature_test.py
@@ -30,6 +30,10 @@ There is much more to come.
MethodDescriptorType = type(str.split)
+def xprint(*args, **kw):
+ if "-v" in sys.argv:
+ print(*args, **kw)
+
@unittest.skipIf(is_pypy, "__feature__ cannot yet be used with PyPy")
class FeaturesTest(unittest.TestCase):
@@ -93,14 +97,14 @@ class FeaturesTest(unittest.TestCase):
for idx in range(0x100):
feature.reset()
config = f"feature_{idx:02x}"
- print()
- print(f"--- Feature Test Config `{config}` ---")
- print("Imports:")
+ xprint()
+ xprint(f"--- Feature Test Config `{config}` ---")
+ xprint("Imports:")
for bit in range(8):
if idx & 1 << bit:
cur_feature = feature_list[bit]
text = f"from __feature__ import {cur_feature}"
- print(text)
+ xprint(text)
eval(compile(text, "<string>", "exec"), globals(), edict)
for bit in range(8):
value = idx & 1 << bit