From: Mike Bayer Date: Thu, 22 Apr 2021 18:33:36 +0000 (-0400) Subject: Ensure sparse backend selection sorts on driver also X-Git-Tag: rel_1_4_12~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4e93067a116b748242e62eb524b2a87490ec18c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Ensure sparse backend selection sorts on driver also Because we have --dbdriver now, we usually have lots of db drivers queued up which affect the selection of backend tests. the sort in possible_configs_for_cls() is used so that when we are only picking some backends due to the sparse flag, we get the same answer each time otherwise pytest-xdist raises an error if two workers have different tests. adding the sort for driver fixes an issue on jenkins master build where the memusage test run frequently failed due to mismatched test collection. Change-Id: I8584c1a3a4e5b759c0e5a2602a93432d9cc8168d --- diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index 858814f914..6370d7ce95 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -688,6 +688,7 @@ def _possible_configs_for_cls(cls, reasons=None, sparse=False): all_configs, key=lambda cfg: ( cfg.db.name, + cfg.db.driver, cfg.db.dialect.server_version_info, ), )