Ejemplo n.º 1
0
def make_extra_tests(text_doctest_dir, spec_test_dir):
    tests = []

    if text_doctest_dir is not None:
        doctest_suites = get_doctests(text_doctest_dir)
        tests.extend(doctest_suites)

    if spec_test_dir is not None:
        spec_testcases = get_spec_tests(spec_test_dir)
        tests.extend(spec_testcases)

    return unittest.TestSuite(tests)
Ejemplo n.º 2
0
def make_extra_tests(text_doctest_dir, spec_test_dir):
    tests = []

    if text_doctest_dir is not None:
        doctest_suites = get_doctests(text_doctest_dir)
        tests.extend(doctest_suites)

    if spec_test_dir is not None:
        spec_testcases = get_spec_tests(spec_test_dir)
        tests.extend(spec_testcases)

    return unittest.TestSuite(tests)
Ejemplo n.º 3
0
    def runTests(self):
        # self.test is a unittest.TestSuite instance:
        #   http://docs.python.org/library/unittest.html#unittest.TestSuite
        tests = self.test

        if self._text_doctest_dir is not None:
            doctest_suites = get_doctests(self._text_doctest_dir)
            tests.addTests(doctest_suites)

        if self._spec_test_dir is not None:
            spec_testcases = get_spec_tests(self._spec_test_dir)
            tests.addTests(spec_testcases)

        TestProgram.runTests(self)
Ejemplo n.º 4
0
    def runTests(self):
        # self.test is a unittest.TestSuite instance:
        #   http://docs.python.org/library/unittest.html#unittest.TestSuite
        tests = self.test

        if self._text_doctest_dir is not None:
            doctest_suites = get_doctests(self._text_doctest_dir)
            tests.addTests(doctest_suites)

        if self._spec_test_dir is not None:
            spec_testcases = get_spec_tests(self._spec_test_dir)
            tests.addTests(spec_testcases)

        TestProgram.runTests(self)