From: Gord Thompson Date: Sun, 20 Jun 2021 19:48:59 +0000 (-0600) Subject: Update README.unittests.rst re: test suite X-Git-Tag: rel_1_7_0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1e5a23c0f53482dd06b013ce8a9453dd0e5eb5d;p=thirdparty%2Fsqlalchemy%2Falembic.git Update README.unittests.rst re: test suite Change-Id: Id7c0c06eb0826b50b55a4f0e18b4fbe397714a23 --- diff --git a/README.unittests.rst b/README.unittests.rst index 8747fe4a..80c1b6a2 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