diff options
author | Gord Thompson <gord@gordthompson.com> | 2021-06-20 13:48:59 -0600 |
---|---|---|
committer | Gord Thompson <gord@gordthompson.com> | 2021-06-20 13:59:41 -0600 |
commit | b1e5a23c0f53482dd06b013ce8a9453dd0e5eb5d (patch) | |
tree | ab2628db5524c38c558a511357da484b4c5c3841 /README.unittests.rst | |
parent | c48373b5ae95a6dc84d4f02404f0b2da54f54a61 (diff) | |
download | alembic-b1e5a23c0f53482dd06b013ce8a9453dd0e5eb5d.tar.gz |
Update README.unittests.rst re: test suite
Change-Id: Id7c0c06eb0826b50b55a4f0e18b4fbe397714a23
Diffstat (limited to 'README.unittests.rst')
-rw-r--r-- | README.unittests.rst | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/README.unittests.rst b/README.unittests.rst index 8747fe4..80c1b6a 100644 --- a/README.unittests.rst +++ b/README.unittests.rst @@ -142,7 +142,7 @@ of what SQLAlchemy and Alembic test is creating and dropping lots of tables as well as running database introspection to see what is there. If there are pre-existing tables or other objects in the target database already, these will get in the way. A failed test run can also be followed by - a run that includes the "--dropfirst" option, which will try to drop +a run that includes the "--dropfirst" option, which will try to drop all existing tables in the target database. The above paragraph changes somewhat when the multiprocessing option @@ -317,9 +317,29 @@ as:: Above we add the pytest "-s" flag so that standard out is not suppressed. -DEVELOPING AND TESTING NEW DIALECTS (SQLAlchemy Only) +DEVELOPING AND TESTING NEW DIALECTS ------------------------------------------------------- -See the file README.dialects.rst for detail on dialects. +Starting with Alembic 1.7, developers of third-party dialects can include the +Alembic test suite using a method similar to that of the SQLAlchemy test +suite. See the SQLAlchemy README for third-party dialects … +https://github.com/sqlalchemy/sqlalchemy/blob/master/README.dialects.rst + +… for detail on the overall structure of a third-party dialect and how to +incorporate the SQLAlchemy test suite. + +To add the Alembic test suite, simply add:: + + from alembic.testing.suite import * # noqa + +to your "test_suite.py" file. Or you can use two separate files:: + + # in test_suite_sqlalchemy.py + from sqlalchemy.testing.suite import * # noqa + +and:: + + # in test_suite_alembic.py + from alembic.testing.suite import * # noqa |