[PATCH 4/5] tests: run python-cffi tests
David Bremner
david at tethera.net
Thu Nov 21 19:03:06 PST 2019
Tomi Ollila <tomi.ollila at iki.fi> writes:
> On Fri, Nov 08 2019, David Bremner wrote:
>
>> Tomi Ollila <tomi.ollila at iki.fi> writes:
>>
>>>
>>> Right -- just that pytest-3 may not be available -- to iterate (tested)...
>>>
>>> if ${NOTMUCH_PYTHON} -m pytest -c $conf --version >/dev/null 2>&1; then
>>>
>>
>> The problem with this is that it might pass if pytest is only installed
>> for python2.
>
> What is the minimum python3 version supported -- In the previous email thread all
> references show python 3.7....
>
> Anyway, in that wip/cffi "branch" commit 97caf16c15d (check for python cffi module)
>
> could also include check for minimum python version, e.g.
>
> +printf "Checking for python 3 cffi... "
> +if "${NOTMUCH_PYTHON}" -c 'import sys,cffi; assert sys.version_info >= (3,7)' 2>/dev/null; then
> + printf "Yes.\n"
> + have_python3_cffi=1
> +else
> + printf "No.\n"
> + have_python3_cffi=0
> +fi
I (force) pushed an updated version of wip/cffi (8d1f30cb) with several changes
along those lines to the configure / build / test scaffolding. In
particular running the tests from the notmuch suite doesn't require
pytest-cov anymore, and pytest and cffi are both checked for only if
python3 is found.
d
More information about the notmuch
mailing list