| 209 | |
| 210 | |
| 211 | class 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 | |
| 236 | def pytest_collection_modifyitems(session, config, items): |
no outgoing calls