[py-svn] py-trunk commit 13115a130ed6: fail doc generation if pygments is not installed

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jan 21 23:29:43 CET 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview/
# User holger krekel <holger at merlinux.eu>
# Date 1264112673 -3600
# Node ID 13115a130ed644130ed55def87838b8c1fa23d72
# Parent c93eada6c8658c505d50803aa3541aa6f278897b
fail doc generation if pygments is not installed

--- a/ISSUES.txt
+++ b/ISSUES.txt
@@ -107,3 +107,4 @@ Also consider implementing py.test --fun
 show available funcargs - it should honour the 
 path::TestClass syntax so one can easily inspect
 where funcargs come from or which are available. 
+

--- a/doc/conftest.py
+++ b/doc/conftest.py
@@ -3,3 +3,7 @@ import py
 #py.test.importorskip("pygments")
 pytest_plugins = ['pytest_restdoc']
 collect_ignore = ['test/attic.txt']
+
+def pytest_runtest_setup(item):
+    if item.fspath.ext == ".txt":
+        import pygments # for raising an error



More information about the pytest-commit mailing list