From ca48f461b2dcac2970829e4e021316654c308d90 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 25 Jan 2022 00:45:30 -0500 Subject: replace test tags with pytest.mark replaced the __tags__ class attribute and the --exclude-tags / --include-tags test runner options with regular pytest.mark names so that we can take advantage of mark expressions. options --nomemory, --notimingintensive, --backend-only, --exclude-tags, --include-tags remain as legacy but make use of pytest mark for implemementation. Added a "mypy" mark for the section of tests that are doing mypy integration tests. The __backend__ and __sparse_backend__ class attributes also use pytest marks for their implementation, which also allows the marks "backend" and "sparse_backend" to be used explicitly. Also removed the no longer used "--cdecimal" option as this was python 2 specific. in theory, the usage of pytest marks could expand such that the whole exclusions system would be based on it, but this does not seem to have any advantage at the moment. Change-Id: Ideeb57d9d49f0efc7fc0b6b923b31207ab783025 --- lib/sqlalchemy/testing/requirements.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 6af2687a9..410ab26ed 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -17,6 +17,7 @@ to provide specific inclusion/exclusions. import platform +from . import config from . import exclusions from . import only_on from .. import create_engine @@ -1295,11 +1296,11 @@ class SuiteRequirements(Requirements): @property def timing_intensive(self): - return exclusions.requires_tag("timing_intensive") + return config.add_to_marker.timing_intensive @property def memory_intensive(self): - return exclusions.requires_tag("memory_intensive") + return config.add_to_marker.memory_intensive @property def threading_with_mock(self): -- cgit v1.2.1