예제 #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)
예제 #2
0
파일: main.py 프로젝트: 668Jerry/blog-jerry
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)
예제 #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)
예제 #4
0
파일: main.py 프로젝트: phihag/py3stache
    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)