Re: [PATCH 4/5] tests: run python-cffi tests

Subject: Re: [PATCH 4/5] tests: run python-cffi tests

Date: Sat, 09 Nov 2019 23:59:37 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Fri, Nov 08 2019, David Bremner wrote:

> Tomi Ollila <tomi.ollila@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

(adjust (3,7) above to any suitable smaller value =D)



Tomi

>
>> (in this particular case redirecting both stdout and stderr is needed
>>  to silence noise in all 'ordinary' cases, being 
>>    1) pytest module not available -- silence stderr
>>    2) pytest version not new enough -- silence stderr
>>    3) pytest exists and is new enought -- silence stdout )
>
> agreed
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: