mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
Show which notmuch command and version is being used
This add the notmuch version and absolute path of the binary used in the pytest header. This is nice when running the tests interactively as you get confirmation you're testing the version you thought you were testing.
This commit is contained in:
parent
fbb8e1f430
commit
a950aa2844
1 changed files with 7 additions and 0 deletions
|
@ -10,6 +10,13 @@ import os
|
|||
import pytest
|
||||
|
||||
|
||||
def pytest_report_header():
|
||||
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())]
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def tmppath(tmpdir):
|
||||
"""The tmpdir fixture wrapped in pathlib.Path."""
|
||||
|
|
Loading…
Reference in a new issue