]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
update for pytest-xdist terminology
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 14 Aug 2020 21:16:05 +0000 (17:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 14 Aug 2020 21:16:05 +0000 (17:16 -0400)
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: If200b4335a6331b606499c569cee4586a41f03fb

lib/sqlalchemy/testing/plugin/pytestplugin.py

index da682ea008bd4df666c3695f5de18c772ff0fef5..75064ada4c37c13f0a65d299817c19bdceb8b4eb 100644 (file)
@@ -57,10 +57,10 @@ def pytest_addoption(parser):
 
 
 def pytest_configure(config):
-    if hasattr(config, "slaveinput"):
-        plugin_base.restore_important_follower_config(config.slaveinput)
+    if hasattr(config, "workerinput"):
+        plugin_base.restore_important_follower_config(config.workerinput)
         plugin_base.configure_follower(
-            config.slaveinput["follower_ident"]
+            config.workerinput["follower_ident"]
         )
     else:
         if config.option.write_idents and \
@@ -87,18 +87,18 @@ 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):