From: Mike Bayer Date: Fri, 14 Aug 2020 16:22:17 +0000 (-0400) Subject: update for pytest-xdist terminology X-Git-Tag: rel_1_3_19~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c4b0c86e4a1be3d8d34d5031fb349b9c6ce6c4f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git update for pytest-xdist terminology With version 2.0.0 they removed the old terminology, which I had no idea had been changed in any case for several years. pushing this out for all branches Change-Id: I51e4f577aeb9ef8205348b50489549f77072a613 (cherry picked from commit f91d335e31e5e14794e349b74edc08aad0f361e3) --- diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index db78ab94b9..079066d829 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -86,9 +86,9 @@ def pytest_addoption(parser): def pytest_configure(config): pytest.register_assert_rewrite("sqlalchemy.testing.assertions") - if hasattr(config, "slaveinput"): - plugin_base.restore_important_follower_config(config.slaveinput) - plugin_base.configure_follower(config.slaveinput["follower_ident"]) + if hasattr(config, "workerinput"): + plugin_base.restore_important_follower_config(config.workerinput) + plugin_base.configure_follower(config.workerinput["follower_ident"]) else: if config.option.write_idents and os.path.exists( config.option.write_idents @@ -116,20 +116,20 @@ if has_xdist: import uuid def pytest_configure_node(node): - # the master for each node fills slaveinput dictionary + # the master for each node fills workerinput dictionary # which pytest-xdist will transfer to the subprocess - plugin_base.memoize_important_follower_config(node.slaveinput) + plugin_base.memoize_important_follower_config(node.workerinput) - node.slaveinput["follower_ident"] = "test_%s" % uuid.uuid4().hex[0:12] + node.workerinput["follower_ident"] = "test_%s" % uuid.uuid4().hex[0:12] from sqlalchemy.testing import provision - provision.create_follower_db(node.slaveinput["follower_ident"]) + provision.create_follower_db(node.workerinput["follower_ident"]) def pytest_testnodedown(node, error): from sqlalchemy.testing import provision - provision.drop_follower_db(node.slaveinput["follower_ident"]) + provision.drop_follower_db(node.workerinput["follower_ident"]) def pytest_collection_modifyitems(session, config, items):