I was supposed to amend the original patch that added this function,
but somehow I botched that. The original version runs, so make an
extra commit for the tidying.
import email.message
import mailbox
import pathlib
import email.message
import mailbox
import pathlib
import socket
import subprocess
import textwrap
import socket
import subprocess
import textwrap
def pytest_report_header():
def pytest_report_header():
+ which = shutil.which('notmuch')
vers = subprocess.run(['notmuch', '--version'], stdout=subprocess.PIPE)
vers = subprocess.run(['notmuch', '--version'], stdout=subprocess.PIPE)
- which = subprocess.run(['which', 'notmuch'], stdout=subprocess.PIPE)
- return ['{} ({})'.format(vers.stdout.decode(errors='replace').strip(),
- which.stdout.decode(errors='replace').strip())]
+ return ['{} ({})'.format(vers.stdout.decode(errors='replace').strip(),which)]
@pytest.fixture(scope='function')
@pytest.fixture(scope='function')