summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/plugin/pytestplugin.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-08-14 12:07:14 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-08-14 17:19:40 -0400
commit3231e281efb2f36dd0dbd628efcd684175064386 (patch)
treee4a961d163c6d594e29fc09d1bd7240123d13548 /lib/sqlalchemy/testing/plugin/pytestplugin.py
parent743d22f3607d24243f55521a5de286f4651faca7 (diff)
downloadsqlalchemy-3231e281efb2f36dd0dbd628efcd684175064386.tar.gz
Provision on different drivers dynamically
We want TOX_POSTGRESQL and similar to be the fixed variable that is configured from CI environment. These variables should refer to database servers but individual drivers like asyncpg mysqlconnector etc. should come from local tox.ini. add a new system to generate per-driver URLs from a simple list of hostname-based URLs delivered from CI environment. Change-Id: I4267b4a70742765388c7e7c4432c1da9d9adece2
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/pytestplugin.py')
-rw-r--r--lib/sqlalchemy/testing/plugin/pytestplugin.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py
index 3df239afa..1b2bbca23 100644
--- a/lib/sqlalchemy/testing/plugin/pytestplugin.py
+++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py
@@ -89,9 +89,9 @@ def pytest_addoption(parser):
def pytest_configure(config):
- 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
@@ -162,20 +162,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):