Exemplo n.º 1
0
def do_doctest(filename):
    failure, total = doctest.testfile(
        filename, module_relative=False,
        optionflags=options)
    assert not failure, "Failure in %r" % filename
Exemplo n.º 2
0
def do_doctest(filename):
    failure, total = doctest.testfile(filename,
                                      module_relative=False,
                                      optionflags=options)
    assert not failure, "Failure in %r" % filename
Exemplo n.º 3
0
    for filename in filenames:
        filename = os.path.join(
            os.path.dirname(os.path.dirname(__file__)),
            filename)
        yield do_doctest, filename

def do_doctest(filename):
    failure, total = doctest.testfile(
        filename, module_relative=False,
        optionflags=options)
    assert not failure, "Failure in %r" % filename

def test_doctest_mods():
    for module in modules:
        yield do_doctest_mod, module

def do_doctest_mod(module):
    module = simple_import(module)
    failure, total = doctest.testmod(
        module, optionflags=options)
    assert not failure, "Failure in %r" % module

if __name__ == '__main__':
    import sys
    import doctest
    args = sys.argv[1:]
    if not args:
        args = filenames
    for filename in args:
        doctest.testfile(filename, module_relative=False)
Exemplo n.º 4
0
                                filename)
        yield do_doctest, filename


def do_doctest(filename):
    failure, total = doctest.testfile(filename,
                                      module_relative=False,
                                      optionflags=options)
    assert not failure, "Failure in %r" % filename


def test_doctest_mods():
    for module in modules:
        yield do_doctest_mod, module


def do_doctest_mod(module):
    module = simple_import(module)
    failure, total = doctest.testmod(module, optionflags=options)
    assert not failure, "Failure in %r" % module


if __name__ == '__main__':
    import sys
    import doctest
    args = sys.argv[1:]
    if not args:
        args = filenames
    for filename in args:
        doctest.testfile(filename, module_relative=False)