unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Floris Bruynooghe <flub@devork.be>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/2] Show which notmuch command and version is being used
Date: Sun, 17 Nov 2019 17:41:34 +0100	[thread overview]
Message-ID: <20191117164135.220969-2-flub@devork.be> (raw)
In-Reply-To: <20191117164135.220969-1-flub@devork.be>

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.
---
 bindings/python-cffi/tests/conftest.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bindings/python-cffi/tests/conftest.py b/bindings/python-cffi/tests/conftest.py
index aa940947..674c7218 100644
--- a/bindings/python-cffi/tests/conftest.py
+++ b/bindings/python-cffi/tests/conftest.py
@@ -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."""
-- 
2.24.0

  reply	other threads:[~2019-11-17 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17 16:41 Rename and small tweaks to wip/cffi Floris Bruynooghe
2019-11-17 16:41 ` Floris Bruynooghe [this message]
2019-11-18 11:43   ` [PATCH 1/2] Show which notmuch command and version is being used David Bremner
2019-11-18 21:27     ` Floris Bruynooghe
2019-11-17 16:41 ` [PATCH 2/2] Rename package to notmuch2 Floris Bruynooghe
2019-11-21  1:43   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191117164135.220969-2-flub@devork.be \
    --to=flub@devork.be \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).