X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython-cffi%2Ftests%2Fconftest.py;h=6835fd30f723509cd6235540d35deadfc838cfa7;hp=aa940947ca56502d93a73e71e5085047f8201e98;hb=6c84dee53193a78cf797b44d3febcc14488ea6b1;hpb=e8cb7c7f60c86cb70df904c624e3f636cb6a0041 diff --git a/bindings/python-cffi/tests/conftest.py b/bindings/python-cffi/tests/conftest.py index aa940947..6835fd30 100644 --- a/bindings/python-cffi/tests/conftest.py +++ b/bindings/python-cffi/tests/conftest.py @@ -1,6 +1,7 @@ import email.message import mailbox import pathlib +import shutil import socket import subprocess import textwrap @@ -10,6 +11,12 @@ import os import pytest +def pytest_report_header(): + which = shutil.which('notmuch') + vers = subprocess.run(['notmuch', '--version'], stdout=subprocess.PIPE) + return ['{} ({})'.format(vers.stdout.decode(errors='replace').strip(),which)] + + @pytest.fixture(scope='function') def tmppath(tmpdir): """The tmpdir fixture wrapped in pathlib.Path.""" @@ -24,7 +31,7 @@ def notmuch(maildir): fixture. """ def run(*args): - """Run a notmuch comand. + """Run a notmuch command. This function runs with a timeout error as many notmuch commands may block if multiple processes are trying to open @@ -71,8 +78,6 @@ def maildir(tmppath): exclude_tags=deleted;spam; [maildir] synchronize_flags=true - [crypto] - gpg_path=gpg """.format(tmppath=tmppath))) return MailDir(tmppath)