mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
python-cffi: use shutil.which
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.
This commit is contained in:
parent
1e072204cd
commit
3185830e3a
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
import email.message
|
import email.message
|
||||||
import mailbox
|
import mailbox
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import shutil
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import textwrap
|
import textwrap
|
||||||
|
@ -11,10 +12,9 @@ import pytest
|
||||||
|
|
||||||
|
|
||||||
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)]
|
||||||
return ['{} ({})'.format(vers.stdout.decode(errors='replace').strip(),
|
|
||||||
which.stdout.decode(errors='replace').strip())]
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
|
|
Loading…
Reference in a new issue