From 469b6fabaf78fa0aad485005fd7bc8be7fe27f92 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 17 Jan 2015 12:46:20 -0500 Subject: [PATCH] - add an exclusion here that helps with the case of 3rd party test suite redefining an existing test in test_suite --- lib/sqlalchemy/testing/plugin/pytestplugin.py | 3 ++- test/dialect/test_suite.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index 4bbc8ed9a2..fbab4966cb 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -84,7 +84,8 @@ def pytest_collection_modifyitems(session, config, items): rebuilt_items = collections.defaultdict(list) items[:] = [ item for item in - items if isinstance(item.parent, pytest.Instance)] + items if isinstance(item.parent, pytest.Instance) + and not item.parent.parent.name.startswith("_")] test_classes = set(item.parent for item in items) for test_class in test_classes: for sub_cls in plugin_base.generate_sub_tests( diff --git a/test/dialect/test_suite.py b/test/dialect/test_suite.py index e6d642ced3..3820a7721a 100644 --- a/test/dialect/test_suite.py +++ b/test/dialect/test_suite.py @@ -1,2 +1,3 @@ from sqlalchemy.testing.suite import * + -- 2.47.3