]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dont generate skipped suite names
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Oct 2025 16:43:16 +0000 (12:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Oct 2025 16:43:16 +0000 (12:43 -0400)
For a suite that is ``__backend__``, if no tests will run, then
don't include that suite in the result at all, rather than
keeping them there and having them skip.  the skip suites are
producing lots of noise in junit files

Change-Id: If58af412b7d8f542d6e1903ca933745075f5c7d9

lib/sqlalchemy/testing/plugin/pytestplugin.py

index 79d14458ca89a52ad2bde0feeac95779eecb79e9..5b82c14bc479a38b4fc01bd322d68b1cb710d0c8 100644 (file)
@@ -288,9 +288,15 @@ def pytest_collection_modifyitems(session, config, items):
             for marker in add_markers:
                 test_class.add_marker(marker)
 
-            for sub_cls in plugin_base.generate_sub_tests(
-                test_class.cls, test_class.module, all_markers
-            ):
+            sub_tests = list(
+                plugin_base.generate_sub_tests(
+                    test_class.cls, test_class.module, all_markers
+                )
+            )
+            if not sub_tests:
+                rebuilt_items[test_class.cls]
+
+            for sub_cls in sub_tests:
                 if sub_cls is not test_class.cls:
                     per_cls_dict = rebuilt_items[test_class.cls]