def METHOD_NAME(self, *fnames):
    here = os.path.dirname(__file__)
    sqla_base = os.path.normpath(os.path.join(here, "..", ".."))
    optionflags = (
        doctest.ELLIPSIS
        | doctest.NORMALIZE_WHITESPACE
        | doctest.IGNORE_EXCEPTION_DETAIL
        | _get_allow_unicode_flag()
    )
    runner = doctest.DocTestRunner(
        verbose=None,
        optionflags=optionflags,
        checker=_get_unicode_checker(),
    )
    parser = doctest.DocTestParser()
    globs = {"print_function": print}
    for fname in fnames:
        path = os.path.join(sqla_base, "doc/build", fname)
        if not os.path.exists(path):
            config.skip_test("Can't find documentation file %r" % path)
        buf = []
        with open(path, encoding="utf-8") as file_:
            def load_include(m):
                fname = m.group(1)
                sub_path = os.path.join(os.path.dirname(path), fname)
                with open(sub_path, encoding="utf-8") as file_:
                    for i, line in enumerate(file_, 1):
                        buf.append((i, line))
                return fname
            def run_buf(fname, is_include):
                if not buf:
                    return
                test = parser.get_doctest(
                    "".join(line for _, line in buf),
                    globs,
                    fname,
                    fname,
                    buf[0][0],
                )
                buf[:] = []
                runner.run(test, clear_globs=False)
                globs.update(test.globs)
            doctest_enabled = True
            for line_counter, line in enumerate(file_, 1):
                line = re.sub(
                    r"{(?:stop|sql|opensql|execsql|printsql)}", "", line
                )
                include = re.match(r"\.\. doctest-include (.+\.rst)", line)
                if include:
                    run_buf(fname, False)
                    include_fname = load_include(include)
                    run_buf(include_fname, True)
                doctest_disable = re.match(
                    r"\.\. doctest-(enable|disable)", line
                )
                if doctest_disable:
                    doctest_enabled = doctest_disable.group(1) == "enable"
                if doctest_enabled:
                    buf.append((line_counter, line))
                else:
                    buf.append((line_counter, "\n"))
            run_buf(fname, False)
            runner.summarize()
            assert not runner.failures