From 67ad9f66a00bdea21602428f748dfbb65220e67c Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sat, 13 Feb 2010 22:58:46 -0500 Subject: Added run-tests.py script and added a helpful error message if nose is not installed. Note the run-tests script will be used by simply running 'nosetests' from the commandline, so the hack in 'tests/__init__.py' has been removed. --- tests/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/__init__.py b/tests/__init__.py index d07ae7d..bad2a37 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,7 +2,12 @@ import os import markdown import codecs import difflib -import nose +try: + import nose +except ImportError: + raise ImportError, "The nose testing framework is required to run " \ + "Python-Markdown tests. Run `easy_install nose` " \ + "to install the latest version." import util from plugins import HtmlOutput, Markdown try: @@ -111,7 +116,3 @@ def TestSyntax(): def run(): nose.main(addplugins=[HtmlOutput(), Markdown()]) -# Hack to make nose run with extensions. Once extensions can be added from -# setup.cfg, the below line can be removed. -# See nose [Issue 271](http://code.google.com/p/python-nose/issues/detail?id=271) -run() -- cgit v1.2.3