[Checkins] SVN: manuel/trunk/ - Removed the dependency on zope.testrunner

Benji York benji+zope.org at benjiyork.com
Wed Mar 9 07:03:51 EST 2011


Log message for revision 120824:
  - Removed the dependency on zope.testrunner
  - Added the ability to run the tests using "setup.py test".
  

Changed:
  U   manuel/trunk/CHANGES.txt
  U   manuel/trunk/setup.py
  U   manuel/trunk/src/manuel/testing.py
  U   manuel/trunk/src/manuel/tests.py

-=-
Modified: manuel/trunk/CHANGES.txt
===================================================================
--- manuel/trunk/CHANGES.txt	2011-03-09 11:41:24 UTC (rev 120823)
+++ manuel/trunk/CHANGES.txt	2011-03-09 12:03:50 UTC (rev 120824)
@@ -1,6 +1,13 @@
 CHANGES
 =======
 
+1.5.0 (2011-03-08)
+------------------
+
+- Removed the dependency on zope.testrunner
+- Added the ability to run the tests using "setup.py test".
+
+
 1.4.1 (2011-01-25)
 ------------------
 

Modified: manuel/trunk/setup.py
===================================================================
--- manuel/trunk/setup.py	2011-03-09 11:41:24 UTC (rev 120823)
+++ manuel/trunk/setup.py	2011-03-09 12:03:50 UTC (rev 120824)
@@ -21,6 +21,8 @@
     + open('CHANGES.txt').read()
     )
 
+tests_require = ['zope.testing']
+
 setup(
     name='manuel',
     version='0',
@@ -33,11 +35,12 @@
     description= 'Manuel lets you build tested documentation.',
     license='ZPL',
     extras_require={
-        'tests': ['zope.testing']
+        'tests': tests_require,
         },
+    tests_require = tests_require,
+    test_suite = 'manuel.tests.test_suite',
     install_requires=[
         'setuptools',
-        'zope.testrunner',
         ],
     include_package_data=True,
     long_description = long_description,

Modified: manuel/trunk/src/manuel/testing.py
===================================================================
--- manuel/trunk/src/manuel/testing.py	2011-03-09 11:41:24 UTC (rev 120823)
+++ manuel/trunk/src/manuel/testing.py	2011-03-09 12:03:50 UTC (rev 120824)
@@ -5,8 +5,9 @@
 import os.path
 import sys
 import unittest
-import zope.testrunner.exceptions
 
+real_doctest = manuel.absolute_import('doctest')
+
 __all__ = ['TestSuite']
 
 class TestCaseMarker(object):
@@ -39,7 +40,7 @@
         results = [r.formatted for r in self.regions if r.formatted]
         if results:
             DIVIDER = '-'*70 + '\n'
-            raise zope.testrunner.exceptions.DocTestFailureException(
+            raise real_doctest.DocTestCase.failureException(
                 '\n' + DIVIDER + DIVIDER.join(results))
 
     def debug(self):

Modified: manuel/trunk/src/manuel/tests.py
===================================================================
--- manuel/trunk/src/manuel/tests.py	2011-03-09 11:41:24 UTC (rev 120823)
+++ manuel/trunk/src/manuel/tests.py	2011-03-09 12:03:50 UTC (rev 120824)
@@ -66,7 +66,3 @@
         suite,
         doctest.DocTestSuite(),
         ))
-
-
-if __name__ == '__main__':
-    unittest.TextTestRunner().run(test_suite())



More information about the checkins mailing list