From: Mike Bayer Date: Thu, 9 Oct 2025 16:43:16 +0000 (-0400) Subject: dont generate skipped suite names X-Git-Tag: rel_2_0_44~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a9e9097658f3b2567086964e0aa42baf315b247;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 (cherry picked from commit 8bb6aaa01bb292ffa7cc8db61d1b6f9c44fb5fc3) --- diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index e5b63adf29..a6eaf1a0ad 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]