]> 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:45:54 +0000 (12:45 -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
(cherry picked from commit 8bb6aaa01bb292ffa7cc8db61d1b6f9c44fb5fc3)

lib/sqlalchemy/testing/plugin/pytestplugin.py

index e5b63adf2955280c066fcac77b80aa2987a80981..a6eaf1a0ad6ea1b6ccadf9a4dc2e9c80b785935a 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]