summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2009-05-17 20:01:32 +0000
committerBob Ippolito <bob@redivi.com>2009-05-17 20:01:32 +0000
commitcb67e3060247998b474ca9a7071841f1b1aa5a6e (patch)
tree1dd27ef369db101cebddd559baf9b6f7fafd4524
parente5a6daaf4bffcaf7cc0644455923c579805f4e7f (diff)
downloadsimplejson-cb67e3060247998b474ca9a7071841f1b1aa5a6e.tar.gz
punting on nosetests support, python setup.py test works as does python -msimplejson.tests http://code.google.com/p/simplejson/issues/detail?id=55
git-svn-id: http://simplejson.googlecode.com/svn/trunk@191 a4795897-2c25-0410-b006-0d3caba88fa1
-rw-r--r--setup.py4
-rw-r--r--simplejson/tests/__init__.py11
2 files changed, 10 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index ea309e9..d01761d 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ The decoder can handle incoming JSON strings of any specified encoding
"""
CLASSIFIERS = filter(None, map(str.strip,
-"""
+"""
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
@@ -89,7 +89,7 @@ def run_setup(with_binary):
license="MIT License",
packages=find_packages(exclude=['ez_setup']),
platforms=['any'],
- test_suite="simplejson.tests",
+ test_suite="simplejson.tests.all_tests_suite",
zip_safe=True,
features=features,
cmdclass={'build_ext': ve_build_ext},
diff --git a/simplejson/tests/__init__.py b/simplejson/tests/__init__.py
index b5042d7..ae08dbc 100644
--- a/simplejson/tests/__init__.py
+++ b/simplejson/tests/__init__.py
@@ -25,7 +25,7 @@ def additional_tests(suite=None):
return suite
-def main():
+def all_tests_suite():
suite = unittest.TestLoader().loadTestsFromNames([
'simplejson.tests.test_check_circular',
'simplejson.tests.test_decode',
@@ -44,9 +44,14 @@ def main():
'simplejson.tests.test_unicode',
])
suite = additional_tests(suite)
+ return OptionalExtensionTestSuite([suite])
+
+
+def main():
runner = unittest.TextTestRunner()
- runner.run(OptionalExtensionTestSuite([suite]))
-
+ suite = all_tests_suite()
+ runner.run(suite)
+
if __name__ == '__main__':
import os