source: eduCommons.buildout/trunk/src/rcom.recipe.seleniumenv/rcom/recipe/seleniumenv/tests/test_docs.py @ 5

Revision 5, 1.6 KB checked in by brent, 4 years ago (diff)

added buildout code.

Line 
1# -*- coding: utf-8 -*-
2"""
3Doctest runner for 'rcom.recipe.seleniumenv'.
4"""
5__docformat__ = 'restructuredtext'
6
7import unittest
8import zc.buildout.tests
9import zc.buildout.testing
10
11from zope.testing import doctest, renormalizing
12
13optionflags =  (doctest.ELLIPSIS |
14                doctest.NORMALIZE_WHITESPACE |
15                doctest.REPORT_ONLY_FIRST_FAILURE)
16
17def setUp(test):
18    zc.buildout.testing.buildoutSetUp(test)
19
20    # Install the recipe in develop mode
21    zc.buildout.testing.install_develop('rcom.recipe.seleniumenv', test)
22
23    # Install any other recipes that should be available in the tests
24    #zc.buildout.testing.install('collective.recipe.foobar', test)
25
26def test_suite():
27    suite = unittest.TestSuite((
28            doctest.DocFileSuite(
29                '../README.txt',
30                setUp=setUp,
31                tearDown=zc.buildout.testing.buildoutTearDown,
32                optionflags=optionflags,
33                checker=renormalizing.RENormalizing([
34                        # If want to clean up the doctest output you
35                        # can register additional regexp normalizers
36                        # here. The format is a two-tuple with the RE
37                        # as the first item and the replacement as the
38                        # second item, e.g.
39                        # (re.compile('my-[rR]eg[eE]ps'), 'my-regexps')
40                        zc.buildout.testing.normalize_path,
41                        ]),
42                ),
43            ))
44    return suite
45
46if __name__ == '__main__':
47    unittest.main(defaultTest='test_suite')
Note: See TracBrowser for help on using the repository browser.