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