mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38: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 mailbox
|
||||
import pathlib
|
||||
import shutil
|
||||
import socket
|
||||
import subprocess
|
||||
import textwrap
|
||||
|
@ -11,10 +12,9 @@ import pytest
|
|||
|
||||
|
||||
def pytest_report_header():
|
||||
which = shutil.which('notmuch')
|
||||
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')
|
||||
|
|
Loading…
Reference in a new issue