Commits

cboos  committed b9eaba2

0.11.6dev: fix two false functional test FAIL errors, related to `!#rst` rendering.

The test cases for docutils should only be added when docutils has been installed with adequate setuptools metadata, otherwise the Trac server will not be able to load the trac.mimeview.rst module due to the extra_requires constraints from setup.py.

Thanks to eli for pointing out the problem.

  • Participants
  • Parent commits 1ea0c07
  • Branches 0.11-stable

Comments (0)

Files changed (2)

File trac/tests/functional/__init__.py

 repository is significant, so recreating the fixture for each test would be
 very costly.
 
-There are two primary objects invovled in the testing, the
+There are two primary objects involved in the testing, the
 FunctionalTestEnvironment and the FunctionalTester.
 
 FunctionalTestEnvironment represents the Trac environment, the Subversion

File trac/wiki/tests/functional.py

 #!/usr/bin/python
 from trac.tests.functional import *
 from trac.mimeview.rst import has_docutils
+from trac.util import get_pkginfo
 
 class TestWiki(FunctionalTwillTestCaseSetup):
     def runTest(self):
     suite.addTest(TestWiki())
     suite.addTest(RegressionTestTicket4812())
     if has_docutils:
-        suite.addTest(ReStructuredTextWikiTest())
-        suite.addTest(ReStructuredTextCodeBlockTest())
+        import docutils
+        if get_pkginfo(docutils):
+            suite.addTest(ReStructuredTextWikiTest())
+            suite.addTest(ReStructuredTextCodeBlockTest())
+        else:
+            print "SKIP: reST wiki tests (docutils has no setuptools metadata)"
     else:
         print "SKIP: reST wiki tests (no docutils)"
     return suite