Commit 3730fd3a authored by Hanno Schlichting's avatar Hanno Schlichting

Skip readme.rst tests when tests are run outside a source checkout.

parent 0d47e4dd
Changelog
=========
4.0.3 (unreleased)
4.0.3 (2014-11-02)
------------------
- Skip readme.rst tests when tests are run outside a source checkout.
4.0.2 (2014-11-02)
------------------
......
......@@ -2637,10 +2637,21 @@ class TestUnicode(unittest.TestCase):
def test_suite():
return unittest.TestSuite((
import os.path
here = os.path.dirname(__file__)
root = os.path.join(here, os.pardir, os.pardir)
readme = os.path.relpath(os.path.join(root, 'README.rst'))
suites = [
DocTestSuite(),
DocFileSuite('../../README.rst'),
unittest.makeSuite(TestParent),
unittest.makeSuite(TestAcquire),
unittest.makeSuite(TestUnicode),
))
]
# This file is only available in a source checkout, skip it
# when tests are run for an installed version.
if os.path.isfile(readme):
suites.append(DocFileSuite(readme))
return unittest.TestSuite(suites)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment