diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-28 11:09:40 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-31 14:44:14 -0400 |
| commit | 803a2373f58e794499e1e0b476db4c23e8dd7f87 (patch) | |
| tree | 6106a2f031cbc0fbb4429d295aef4c486afbae7a /lib/sqlalchemy/testing | |
| parent | 2c2e01a0c6d0847f5648fd0120c8fa0bd5f6268f (diff) | |
| download | sqlalchemy-803a2373f58e794499e1e0b476db4c23e8dd7f87.tar.gz | |
Add DeclarativeMeta to globals
Fixed issue in mypy plugin where newly added support for
:func:`_orm.as_declarative` needed to more fully add the
``DeclarativeMeta`` class to the mypy interpreter's state so that it does
not result in a name not found error; additionally improves how global
names are setup for the plugin including the ``Mapped`` name.
Introduces directory oriented testing as well, where a full
set of files will be copied, mypy runs, then zero or more patches
are applied and mypy is run again, to fully test incremental
behaviors.
Fixes: sqlalchemy/sqlalchemy2-stubs/#14
Change-Id: Ide785c07e19ba0694e8cf6f91560094ecb182016
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 46844803b..b6381dd57 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -1236,6 +1236,18 @@ class SuiteRequirements(Requirements): ) @property + def patch_library(self): + def check_lib(): + try: + __import__("patch") + except ImportError: + return False + else: + return True + + return exclusions.only_if(check_lib, "patch library needed") + + @property def non_broken_pickle(self): from sqlalchemy.util import pickle |
