diff options
| author | Maico Timmerman <maico.timmerman@gmail.com> | 2021-04-30 16:36:23 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-05-04 17:41:33 -0400 |
| commit | 36b627612483331f96b0f7490d9b3d6322c5dd6a (patch) | |
| tree | bad55871937a953d7270f7fbe0faf2e853e0deea /lib/sqlalchemy/testing/plugin/plugin_base.py | |
| parent | f1f4f466fd809a14bff6d0c405a1d5da87438379 (diff) | |
| download | sqlalchemy-36b627612483331f96b0f7490d9b3d6322c5dd6a.tar.gz | |
mypy: load extra test files from environment variable
Add --mypy-extra-test-path parameter to pytest execution to list extra
directories to load test files from.
This enables the stubs repo to load this plugin and specify it's
own test directory to run mypy tests. Supports both single file tests
and incremental tests based on patch files.
Change-Id: Id6424ff15b2f527183b9713384df3d625a8e6eb8
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py')
| -rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index 6370d7ce9..492a3224d 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -226,6 +226,15 @@ def setup_options(make_option): dest="dump_pyannotate", help="Run pyannotate and dump json info to given file", ) + make_option( + "--mypy-extra-test-path", + type=str, + action="append", + default=[], + dest="mypy_extra_test_paths", + help="Additional test directories to add to the mypy tests. " + "This is used only when running mypy tests. Multiple OK", + ) def configure_follower(follower_ident): |
