Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> probably
>
> test_expect_success "${NOTMUCH_PYTHON} -m pytest \
> --log-file=$TMP_DIRECTORY/test.output \
> $NOTMUCH_SRCDIR/bindings/python-cffi/build/stage"
>
> worked (which reminds me out-of-tree... ;)
>
despite looking prettier this does not work because it looks for the
"notdb" module in the current directory. It could work (maybe) if we set
PYTHONPATH. Would that be better than the 'cd'?
> as for checking pytest existence, the following works somewhat:
>
> ~/test-venv/bin/python3 -m pytest --version
>
> It prints the version, then exists. Could not figure out how to request
> specific version in quick look (10 min search/trial/error session),
> parsing version output is so... :/
I think something like
conf=$(mktemp)
printf "[pytest]\nminversion=3.0\n" > $conf
if pytest-3 -c $conf --version >/dev/null; then
have_pytest=1
else
have_pytest=0
fi
rm -f $(conf)
should work.
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch