configure: Prefer pytest over pytest3

When looking for a pytest executable we should be looking for the ones
that `pip` installs in a virtualenv (`pytest` and `py.test`) before we
look for the ones that `apt` installs system-wide (`pytest3` and
`py.test3`) because these may not be part of the virtualenv that all
other packages are installed in.
This commit is contained in:
Christian Decker 2021-01-05 13:51:02 +01:00
parent d0dcb7cb42
commit 16801e31e9

2
configure vendored
View File

@ -56,7 +56,7 @@ default_cwarnflags()
default_pytest() default_pytest()
{ {
PYTEST_BINS="pytest-3 pytest3 pytest py.test" PYTEST_BINS="pytest py.test pytest3 pytest-3"
for p in $PYTEST_BINS; do for p in $PYTEST_BINS; do
if [ "$(which $p)" != "" ] ; then if [ "$(which $p)" != "" ] ; then
"$p" --version 2>&1 | grep -q "python3" || continue "$p" --version 2>&1 | grep -q "python3" || continue