From 9f69ac1c303a423c9df5ab8e4cb5122b52e311a3 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sun, 22 Oct 2006 17:23:28 -0400 Subject: [PATCH] Warn if libxslt is not available --- tests/test_filter_xslt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_filter_xslt.py b/tests/test_filter_xslt.py index ca7994e..061f805 100644 --- a/tests/test_filter_xslt.py +++ b/tests/test_filter_xslt.py @@ -20,6 +20,9 @@ try: except: try: from subprocess import Popen, PIPE - except ImportError: + xsltproc=Popen(['xsltproc','--version'],stdout=PIPE,stderr=PIPE) + xsltproc.communicate() + if xsltproc.returncode != 0: raise ImportError + except: logger.warn("libxslt is not available => can't test xslt filters") del XsltFilterTests.test_xslt_filter