MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / XDistHooks

Class XDistHooks

lib/sqlalchemy/testing/plugin/pytestplugin.py:212–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212class XDistHooks:
213 def pytest_configure_node(self, node):
214 from sqlalchemy.testing import provision
215 from sqlalchemy.testing import asyncio
216
217 # the master for each node fills workerinput dictionary
218 # which pytest-xdist will transfer to the subprocess
219
220 plugin_base.memoize_important_follower_config(node.workerinput)
221
222 node.workerinput["follower_ident"] = "test_%s" % uuid.uuid4().hex[0:12]
223
224 asyncio._maybe_async_provisioning(
225 provision.create_follower_db, node.workerinput["follower_ident"]
226 )
227
228 def pytest_testnodedown(self, node, error):
229 from sqlalchemy.testing import provision
230 from sqlalchemy.testing import asyncio
231
232 asyncio._maybe_async_provisioning(
233 provision.drop_follower_db, node.workerinput["follower_ident"]
234 )
235
236
237def pytest_collection_modifyitems(session, config, items):

Callers 1

pytest_configureFunction · 0.85

Calls

no outgoing calls

Tested by 1

pytest_configureFunction · 0.68