diff options
author | CaselIT <cfederico87@gmail.com> | 2021-08-23 20:54:00 +0200 |
---|---|---|
committer | CaselIT <cfederico87@gmail.com> | 2021-08-23 21:26:32 +0200 |
commit | 7fd48061bbf893002b2d7a624b313b09ee0a9700 (patch) | |
tree | 6620421f730280b84883ad524bbbd98aea5d99a4 /tests/test_stubs.py | |
parent | 18136dd42a0820fbecacea8cb0e7f47b002ce68a (diff) | |
download | alembic-7fd48061bbf893002b2d7a624b313b09ee0a9700.tar.gz |
avoid importing ForwardRef that's py3.9+ only
Change-Id: I76654f10e208d618e21ab0c884cb0abede4d6177
Diffstat (limited to 'tests/test_stubs.py')
-rw-r--r-- | tests/test_stubs.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/test_stubs.py b/tests/test_stubs.py index c5186c3..efb1a9d 100644 --- a/tests/test_stubs.py +++ b/tests/test_stubs.py @@ -4,22 +4,11 @@ import sys import alembic from alembic.testing import eq_ -from alembic.testing import skip_if from alembic.testing import TestBase _home = Path(__file__).parent.parent -def requirements(): - try: - import black # noqa - import zimports # noqa - - return False - except Exception: - return True - - def run_command(file): res = subprocess.run( [ @@ -37,14 +26,14 @@ def run_command(file): class TestStubFiles(TestBase): - @skip_if(requirements, "black and zimports are required for this test") + __requires__ = ("stubs_test",) + def test_op_pyi(self): res = run_command("op") generated = res.stdout expected = Path(alembic.__file__).parent / "op.pyi" eq_(generated, expected.read_text()) - @skip_if(requirements, "black and zimports are required for this test") def test_context_pyi(self): res = run_command("context") generated = res.stdout |