From 8bb6aaa01bb292ffa7cc8db61d1b6f9c44fb5fc3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 9 Oct 2025 12:43:16 -0400 Subject: [PATCH] dont generate skipped suite names 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 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index 79d14458ca..5b82c14bc4 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -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] -- 2.47.3