Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Commit 49e1a5c

Browse files
committed
Fix for test collection order
1 parent dc646e4 commit 49e1a5c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ function run_tests {
6464
python -c "import matplotlib; print(matplotlib.__file__)"
6565
python -c "from matplotlib import font_manager"
6666

67+
# Workaround for pytest-xdist flaky collection order
68+
# https://github.com/pytest-dev/pytest/issues/920
69+
# https://github.com/pytest-dev/pytest/issues/1075
70+
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
71+
echo PYTHONHASHSEED=$PYTHONHASHSEED
72+
6773
echo "testing matplotlib using $NPROC process(es)"
6874
py.test $PYTEST_ARGS $MPL_INSTALL_DIR $(dirname ${MPL_INSTALL_DIR})/mpl_toolkits
6975

0 commit comments

Comments
 (0)