MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / XDistHooks

Class XDistHooks

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

Source from the content-addressed store, hash-verified

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

Callers 1

pytest_configureFunction · 0.85

Calls

no outgoing calls

Tested by 1

pytest_configureFunction · 0.68