[diffoscope] 01/01: tests: Show Debian packages installed in test report.

Chris Lamb chris at chris-lamb.co.uk
Tue Apr 4 15:46:17 CEST 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch experimental
in repository diffoscope.

commit c86a9e192db860367b2f7fcf32b498211e600b42
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Apr 4 15:45:47 2017 +0200

    tests: Show Debian packages installed in test report.
---
 tests/conftest.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/conftest.py b/tests/conftest.py
index 5a38a62..80cddc9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -19,6 +19,7 @@
 # along with diffoscope.  If not, see <https://www.gnu.org/licenses/>.
 
 import pytest
+import subprocess
 
 from diffoscope.path import set_path
 from diffoscope.locale import set_locale
@@ -47,3 +48,18 @@ def reload_comparators():
 @pytest.fixture(autouse=True)
 def reset_progress():
     ProgressManager().reset()
+
+
+def pytest_report_header(config):
+    if config.option.verbose == 0:
+        return
+
+    try:
+        return [
+            "",
+            "Debian packages installed:",
+            "",
+            subprocess.check_output(('dpkg', '-l'))
+        ]
+    except:
+        pass

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list