_test.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ibex 作者: atavory 项目源码 文件源码
def load_tests(loader, tests, ignore):
    import ibex

    doctest_flags = doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE

    tests.addTests(doctest.DocTestSuite(__import__('ibex'), optionflags=doctest_flags))
    for mod_name in dir(ibex):
        try:
            mod =__import__('ibex.' + mod_name)
        except ImportError:
            continue
        tests.addTests(doctest.DocTestSuite(mod, optionflags=doctest_flags))

    f_name = os.path.join(_this_dir, '../ibex/sklearn/__init__.py')
    tests.addTests(doctest.DocFileSuite(f_name, module_relative=False, optionflags=doctest_flags))

    f_name = os.path.join(_this_dir, '../ibex/xgboost/__init__.py')
    tests.addTests(doctest.DocFileSuite(f_name, module_relative=False, optionflags=doctest_flags))

    f_name = os.path.join(_this_dir, '../ibex/tensorflow/contrib/keras/wrappers/scikit_learn/__init__.py')
    tests.addTests(doctest.DocFileSuite(f_name, module_relative=False, optionflags=doctest_flags))

    doc_f_names = list(glob(os.path.join(_this_dir, '../docs/source/*.rst')))
    doc_f_names += [os.path.join(_this_dir, '../README.rst')]
    tests.addTests(
        doctest.DocFileSuite(*doc_f_names, module_relative=False, optionflags=doctest_flags))

    doc_f_names = list(glob(os.path.join(_this_dir, '../docs/build/text/*.txt')))
    tests.addTests(
        doctest.DocFileSuite(*doc_f_names, module_relative=False, optionflags=doctest_flags))

    return tests
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号