diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-01-25 00:45:30 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-01-25 09:25:40 -0500 |
| commit | ca48f461b2dcac2970829e4e021316654c308d90 (patch) | |
| tree | f9f696336377b08e7261c0e8e9eae6019b98278a /lib/sqlalchemy/testing/config.py | |
| parent | ff1ab665cb1694b85085680d1a02c7c11fa2a6d4 (diff) | |
| download | sqlalchemy-ca48f461b2dcac2970829e4e021316654c308d90.tar.gz | |
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
Diffstat (limited to 'lib/sqlalchemy/testing/config.py')
| -rw-r--r-- | lib/sqlalchemy/testing/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/config.py b/lib/sqlalchemy/testing/config.py index f326c124d..268a56421 100644 --- a/lib/sqlalchemy/testing/config.py +++ b/lib/sqlalchemy/testing/config.py @@ -106,6 +106,14 @@ def mark_base_test_class(): return _fixture_functions.mark_base_test_class() +class _AddToMarker: + def __getattr__(self, attr): + return getattr(_fixture_functions.add_to_marker, attr) + + +add_to_marker = _AddToMarker() + + class Config: def __init__(self, db, db_opts, options, file_config): self._set_name(db) |
