Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 862651d

Browse files
committed
Fix PYTHONHASHSEED setup on OS X.
The shuf command does not exist there, though it can be installed with brew. But we've got Python already...
1 parent 0cab7c6 commit 862651d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ script:
154154
# Workaround for pytest-xdist flaky collection order
155155
# https://github.com/pytest-dev/pytest/issues/920
156156
# https://github.com/pytest-dev/pytest/issues/1075
157-
export PYTHONHASHSEED=$(shuf -i 1-4294967295 -n 1)
157+
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
158158
echo PYTHONHASHSEED=$PYTHONHASHSEED
159159
160160
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8

0 commit comments

Comments
 (0)