Skip to content

Commit

Permalink
use nose and add a simple test, if nose is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed Jun 2, 2015
1 parent 932aacb commit a7376c0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion setup.py
Expand Up @@ -33,6 +33,21 @@ def get_authors():
return authors


if "test" in sys.argv:
"""
nose is a optional dependency, so test import
if user run with: './setup.py test'
"""
try:
import nose
except ImportError as err:
print("Error: Can't import 'nose': %s" % err)
print("Maybe not installed or virtualenv not activated?!?")
print("e.g.:")
print("~your/env/$ source bin/activate")
print("~your/env/$ pip install nose")


setup(
name='python-creole',
version=VERSION_STRING,
Expand Down Expand Up @@ -75,5 +90,5 @@ def get_authors():
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Utilities",
],
test_suite="creole.tests.get_test_suite",
test_suite="nose.collector",
)

0 comments on commit a7376c0

Please sign in to comment.