Skip to content

Commit 85792bc

Browse files
authored
Fix stubtest for sqlalchemy.testing.plugin.pytestplugin (#9533)
1 parent 1a9aa3f commit 85792bc

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest

stubs/SQLAlchemy/@tests/stubtest_allowlist.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ sqlalchemy.testing.provision.stop_test_class_outside_fixtures
5959
sqlalchemy.testing.provision.temp_table_keyword_args
6060
sqlalchemy.testing.provision.update_db_opts
6161

62-
# requires other packages
63-
sqlalchemy.testing.plugin.pytestplugin
64-
65-
# can't be imported
62+
# KeyError/AttributeError on import due to dynamic initialization from a different module
6663
sqlalchemy.testing.fixtures
6764
sqlalchemy.testing.pickleable
6865
sqlalchemy.testing.plugin.bootstrap

stubs/SQLAlchemy/sqlalchemy/testing/plugin/pytestplugin.pyi

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from typing import Any
1+
from typing_extensions import Final
22

33
from . import plugin_base
44

5-
has_xdist: bool
6-
py2k: Any
5+
py2k: Final = False
76

87
def pytest_addoption(parser) -> None: ...
98
def pytest_configure(config) -> None: ...
@@ -14,8 +13,6 @@ def collect_types_fixture() -> None: ...
1413
def pytest_sessionstart(session) -> None: ...
1514
def pytest_sessionfinish(session) -> None: ...
1615
def pytest_collection_finish(session): ...
17-
def pytest_configure_node(node) -> None: ...
18-
def pytest_testnodedown(node, error) -> None: ...
1916
def pytest_collection_modifyitems(session, config, items): ...
2017
def pytest_pycollect_makeitem(collector, name, obj): ...
2118
def pytest_runtest_setup(item) -> None: ...

0 commit comments

Comments
 (0)