[liblouis-liblouisxml] [liblouis] r707 committed - Skip the harness tests (gracefully) if nose is not installed.

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 27 Jun 2012 13:20:26 +0000

Revision: 707
Author:   christian.egli@xxxxxxxxxxxxxx
Date:     Wed Jun 27 06:19:57 2012
Log:      Skip the harness tests (gracefully) if nose is not installed.

http://code.google.com/p/liblouis/source/detail?r=707

Modified:
 /trunk/tests/runHarness.py

=======================================
--- /trunk/tests/runHarness.py  Tue Jun 12 06:19:59 2012
+++ /trunk/tests/runHarness.py  Wed Jun 27 06:19:57 2012
@@ -32,11 +32,15 @@
 import sys
 import traceback
 from glob import iglob
-from nose.plugins import Plugin
-from nose import run
 from louis import translate, backTranslateString
from louis import noContractions, compbrlAtCursor, dotsIO, comp8Dots, pass1Only, compbrlLeftCursor, otherTrans, ucBrl

+try:
+    from nose.plugins import Plugin
+    from nose import run
+except ImportError:
+    sys.stderr.write("The harness tests require nose. Skipping...\n")
+    sys.exit(0)

 ### Nosetest plugin for controlling the output format. ###

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouis] r707 committed - Skip the harness tests (gracefully) if nose is not installed. - liblouis