本文整理匯總了Python中numpy.testing.Tester方法的典型用法代碼示例。如果您正苦於以下問題:Python testing.Tester方法的具體用法?Python testing.Tester怎麽用?Python testing.Tester使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類numpy.testing
的用法示例。
在下文中一共展示了testing.Tester方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test
# 需要導入模塊: from numpy import testing [as 別名]
# 或者: from numpy.testing import Tester [as 別名]
def test(*a, **kw):
# Nose never recurses into directories with underscores prefix, so we
# need to list those explicitly. Note that numpy.testing.Tester inserts
# the top-level package path determined from __file__ to argv unconditionally,
# so we only need to add the part that is not otherwise recursed into.
import os
underscore_modules = ['_lib', '_build_utils']
base_dir = os.path.abspath(os.path.dirname(__file__))
underscore_paths = [os.path.join(base_dir, name) for name in underscore_modules]
kw['extra_argv'] = list(kw.get('extra_argv', [])) + underscore_paths
return test._tester.test(*a, **kw)