diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_stubs.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test_stubs.py b/tests/test_stubs.py index d1e286e..5831013 100644 --- a/tests/test_stubs.py +++ b/tests/test_stubs.py @@ -4,6 +4,7 @@ import subprocess import sys import alembic +from alembic.testing import combinations from alembic.testing import eq_ from alembic.testing import TestBase @@ -16,7 +17,7 @@ def run_command(file): sys.executable, str((_home / "tools" / "write_pyi.py").relative_to(_home)), "--stdout", - "--file", + "--name", file, ], stdout=subprocess.PIPE, @@ -43,6 +44,14 @@ class TestStubFiles(TestBase): expected = file_path.read_text() eq_(generated, expected, compare(generated, expected)) + @combinations("batch_op", "op_cls") + def test_operation_base_file(self, name): + res = run_command(name) + generated = res.stdout + file_path = Path(alembic.__file__).parent / "operations/base.py" + expected = file_path.read_text() + eq_(generated, expected, compare(generated, expected)) + def compare(actual: str, expected: str): diff = difflib.unified_diff( |