Skip to content

Commit d1e5bcd

Browse files
committed
TST: Set PYTHONHASHSEED so xdist doesn't break.
1 parent 8368772 commit d1e5bcd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ci/script_multi.sh

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
1717
python -c "$pycmd"
1818
fi
1919

20+
# Workaround for pytest-xdist flaky collection order
21+
# https://github.com/pytest-dev/pytest/issues/920
22+
# https://github.com/pytest-dev/pytest/issues/1075
23+
export PYTHONHASHSEED=$(shuf -i 1-4294967295 -n 1)
24+
echo PYTHONHASHSEED=$PYTHONHASHSEED
25+
2026
if [ "$BUILD_TEST" ]; then
2127
echo "We are not running pytest as this is simply a build test."
2228
elif [ "$COVERAGE" ]; then

0 commit comments

Comments
 (0)