Python numpy.testing.Tester() Examples

The following are code examples for showing how to use numpy.testing.Tester(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: LaserTOF   Author: kyleuckert   File: __init__.py    MIT License 5 votes vote down vote up
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) 
Example 2
Project: wine-ml-on-aws-lambda   Author: pierreant   File: __init__.py    Apache License 2.0 5 votes vote down vote up
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) 
Example 3
Project: Splunking-Crime   Author: nccgroup   File: __init__.py    GNU Affero General Public License v3.0 5 votes vote down vote up
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)