From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 789DB6DE0F56 for ; Mon, 18 Nov 2019 03:43:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.061 X-Spam-Level: X-Spam-Status: No, score=-0.061 tagged_above=-999 required=5 tests=[AWL=-0.060, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BFFOSaDpBSMF for ; Mon, 18 Nov 2019 03:43:15 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 575D26DE0E84 for ; Mon, 18 Nov 2019 03:43:15 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1iWfR1-0006oP-D8; Mon, 18 Nov 2019 06:43:11 -0500 Received: (nullmailer pid 23404 invoked by uid 1000); Mon, 18 Nov 2019 11:43:09 -0000 From: David Bremner To: Floris Bruynooghe , notmuch@notmuchmail.org Subject: Re: [PATCH 1/2] Show which notmuch command and version is being used In-Reply-To: <20191117164135.220969-2-flub@devork.be> References: <20191117164135.220969-1-flub@devork.be> <20191117164135.220969-2-flub@devork.be> Date: Mon, 18 Nov 2019 07:43:09 -0400 Message-ID: <877e3xcsvm.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Nov 2019 11:43:16 -0000 Floris Bruynooghe writes: > 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) I think it would be better to use "shutil.which()" here, to avoid variations in shell builtin vs executable which. If you agree I can make the change.