From e300dec60afdda778142fe478fe0e74a12242e2d Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sun, 22 Oct 2023 11:25:28 +0200 Subject: [PATCH] Fix --dbs test option At some point a version of pytest seems to have broken the previous implementation Change-Id: I7dfd4c8743f5214a3110dd1b6da4fa8296895899 --- lib/sqlalchemy/testing/plugin/plugin_base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index 585f6bac3c..f6a7f152b7 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -14,6 +14,7 @@ from argparse import Namespace import configparser import logging import os +from pathlib import Path import re import sys from typing import Any @@ -320,6 +321,10 @@ def _log(opt_str, value, parser): def _list_dbs(*args): + if file_config is None: + # assume the current working directory is the one containing the + # setup file + read_config(Path.cwd()) print("Available --db options (use --dburi to override)") for macro in sorted(file_config.options("db")): print("%20s\t%s" % (macro, file_config.get("db", macro))) -- 2.47.3