コード例 #1
0
ファイル: test_support.py プロジェクト: kanghaiyang/numba
def testmod():
    """
    Tests a doctest modules with numba functions. When run in nosetests, only
    populates module.__test__, when run as main, runs the doctests.
    """
    modname = sys._getframe(1).f_globals['__name__']
    mod = __import__(modname)
    doctest_support.testmod(mod, run_doctests=modname == '__main__')
    #if modname == '__main__':
    #    numba.nose_run(mod)
コード例 #2
0
ファイル: test_support.py プロジェクト: KanzhiWu/numba
def testmod(module=None, runit=False):
    """
    Tests a doctest modules with numba functions. When run in nosetests, only
    populates module.__test__, when run as main, runs the doctests.
    """
    if module is None:
        modname = sys._getframe(1).f_globals['__name__']
        module = __import__(modname)
    else:
        modname = module.__name__

    doctest_support.testmod(module, run_doctests=runit or modname == '__main__')