Do not sort entry points when adding them to `PYTEST_PLUGINS`.
Apparently, the order of loading does matter, and reordering
the entry points from `dev-python/pytest-xdist` leads to warnings
that break the test suite of `dev-python/inline-snapshot`.
Signed-off-by: Michał Górny <
[email protected]>
---
eclass/python-utils-r1.eclass | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 68faa9e2adf9..9cdfdc87019f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1458,11 +1458,13 @@ epytest() {
from importlib.metadata import distribution, entry_points
packages = {distribution(x).name for x in sys.argv[1:]}
- plugins = {
+ # In packages defining multiple entry points, we must
+ # list them in the same order! + plugins = (
x.value for x in entry_points(group="pytest11")
if x.dist.name in packages
- }
- sys.stdout.write(",".join(sorted(plugins)))
+ )
+ sys.stdout.write(",".join(plugins))
EOF
)
else
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)