class_docstr: Nose test runner.
  
  This class is made available as numpy.testing.Tester, and a test function
  is typically added to a package's __init__.py like so::
  
    from numpy.testing import Tester
    test = Tester().test
  
  Calling this test function finds and runs all tests associated with the
  package and all its sub-packages.
  
  Attributes
  ----------
  package_path : str
      Full path to the package to test.
  package_name : str
      Name of the package to test.
  
  Parameters
  ----------
  package : module, str or None, optional
      The package to test. If a string, this should be the full path to
      the package. If None (default), `package` is set to the module from
      which `NoseTester` is initialized.
  raise_warnings : None, str or sequence of warnings, optional
      This specifies which warnings to configure as 'raise' instead
      of being shown once during the test execution.  Valid strings are:
  
        - "develop" : equals ``(Warning,)``
        - "release" : equals ``()``, don't raise on any warnings.
  
      Default is "release".
  depth : int, optional
      If `package` is None, then this can be used to initialize from the
      module of the caller of (the caller of (...)) the code that
      initializes `NoseTester`. Default of 0 means the module of the
      immediate caller; higher values are useful for utility routines that
      want to initialize `NoseTester` objects on behalf of other code.
class_docstr_tok: ["Nose","test","runner",".","This","class","is","made","available","as","numpy.testing.Tester",",","and","a","test","function","is","typically","added","to","a","package","'s","__init__.py","like","so",":",":","from","numpy.testing","import","Tester","test","=","Tester","(",")",".test","Calling","this","test","function","finds","and","runs","all","tests","associated","with","the","package","and","all","its","sub-packages",".","Attributes","--","--","--","--","--","package_path",":","str","Full","path","to","the","package","to","test",".","package_name",":","str","Name","of","the","package","to","test",".","Parameters","--","--","--","--","--","package",":","module",",","str","or","None",",","optional","The","package","to","test",".","If","a","string",",","this","should","be","the","full","path","to","the","package",".","If","None","(","default",")",",","`","package","`","is","set","to","the","module","from","which","`","NoseTester","`","is","initialized",".","raise_warnings",":","None",",","str","or","sequence","of","warnings",",","optional","This","specifies","which","warnings","to","configure","as","'raise","'","instead","of","being","shown","once","during","the","test","execution",".","Valid","strings","are",":","-","``","develop","''",":","equals","``","(","Warning",",",")","``","-","``","release","''",":","equals","``","(",")","``",",","do","n't","raise","on","any","warnings",".","Default","is","``","release","''",".","depth",":","int",",","optional","If","`","package","`","is","None",",","then","this","can","be","used","to","initialize","from","the","module","of","the","caller","of","(","the","caller","of","(","...",")",")","the","code","that","initializes","`","NoseTester","`",".","Default","of","0","means","the","module","of","the","immediate","caller",";","higher","values","are","useful","for","utility","routines","that","want","to","initialize","`","NoseTester","`","objects","on","behalf","of","other","code","."]
docstr: Run benchmarks for module using nose.
  
  Parameters
  ----------
  label : {'fast', 'full', '', attribute identifier}, optional
      Identifies the benchmarks to run. This can be a string to pass to
      the nosetests executable with the '-A' option, or one of several
      special values.  Special values are:
  
      * 'fast' - the default - which corresponds to the ``nosetests -A``
        option of 'not slow'.
      * 'full' - fast (as above) and slow benchmarks as in the
        'no -A' option to nosetests - this is the same as ''.
      * None or '' - run all tests.
      * attribute_identifier - string passed directly to nosetests as '-A'.
  
  verbose : int, optional
      Verbosity value for benchmark outputs, in the range 1-10. Default is 1.
  extra_argv : list, optional
      List with any extra arguments to pass to nosetests.
  
  Returns
  -------
  success : bool
      Returns True if running the benchmarks works, False if an error
      occurred.
  
  Notes
  -----
  Benchmarks are like tests, but have names starting with "bench" instead
  of "test", and can be found under the "benchmarks" sub-directory of the
  module.
  
  Each NumPy module exposes `bench` in its namespace to run all benchmarks
  for it.
  
  Examples
  --------
  >>> success = np.lib.bench() #doctest: +SKIP
  Running benchmarks for numpy.lib
  ...
  using 562341 items:
  unique:
  0.11
  unique1d:
  0.11
  ratio: 1.0
  nUnique: 56230 == 56230
  ...
  OK
  
  >>> success #doctest: +SKIP
  True
docstr_tok: ["Run","benchmarks","for","module","using","nose",".","Parameters","--","--","--","--","--","label",":","{","'fast","'",",","'full","'",",","``",",","attribute","identifier","}",",","optional","Identifies","the","benchmarks","to","run",".","This","can","be","a","string","to","pass","to","the","nosetests","executable","with","the","'-A","'","option",",","or","one","of","several","special","values",".","Special","values","are",":","*","'fast","'","-","the","default","-","which","corresponds","to","the","``","nosetests","-A","``","option","of","'not","slow","'",".","*","'full","'","-","fast","(","as","above",")","and","slow","benchmarks","as","in","the","'no","-A","'","option","to","nosetests","-","this","is","the","same","as","``",".","*","None","or","``","-","run","all","tests",".","*","attribute_identifier","-","string","passed","directly","to","nosetests","as","'-A","'",".","verbose",":","int",",","optional","Verbosity","value","for","benchmark","outputs",",","in","the","range","1-10",".","Default","is","1.","extra_argv",":","list",",","optional","List","with","any","extra","arguments","to","pass","to","nosetests",".","Returns","--","--","--","-","success",":","bool","Returns","True","if","running","the","benchmarks","works",",","False","if","an","error","occurred",".","Notes","--","--","-","Benchmarks","are","like","tests",",","but","have","names","starting","with","``","bench","''","instead","of","``","test","''",",","and","can","be","found","under","the","``","benchmarks","''","sub-directory","of","the","module",".","Each","NumPy","module","exposes","`","bench","`","in","its","namespace","to","run","all","benchmarks","for","it",".","Examples","--","--","--","--",">",">",">","success","=","np.lib.bench","(",")","#","doctest",":","+SKIP","Running","benchmarks","for","numpy.lib","...","using","562341","items",":","unique",":","0.11","unique1d",":","0.11","ratio",":","1.0","nUnique",":","56230","==","56230","...","OK",">",">",">","success","#","doctest",":","+SKIP","True"]
code: def bench(self, label="fast", verbose=1, extra_argv=None):
      """
      Run benchmarks for module using nose.
  
      Parameters
      ----------
      label : {'fast', 'full', '', attribute identifier}, optional
          Identifies the benchmarks to run. This can be a string to pass to
          the nosetests executable with the '-A' option, or one of several
          special values.  Special values are:
  
          * 'fast' - the default - which corresponds to the ``nosetests -A``
            option of 'not slow'.
          * 'full' - fast (as above) and slow benchmarks as in the
            'no -A' option to nosetests - this is the same as ''.
          * None or '' - run all tests.
          * attribute_identifier - string passed directly to nosetests as '-A'.
  
      verbose : int, optional
          Verbosity value for benchmark outputs, in the range 1-10. Default is 1.
      extra_argv : list, optional
          List with any extra arguments to pass to nosetests.
  
      Returns
      -------
      success : bool
          Returns True if running the benchmarks works, False if an error
          occurred.
  
      Notes
      -----
      Benchmarks are like tests, but have names starting with "bench" instead
      of "test", and can be found under the "benchmarks" sub-directory of the
      module.
  
      Each NumPy module exposes `bench` in its namespace to run all benchmarks
      for it.
  
      Examples
      --------
      >>> success = np.lib.bench() #doctest: +SKIP
      Running benchmarks for numpy.lib
      ...
      using 562341 items:
      unique:
      0.11
      unique1d:
      0.11
      ratio: 1.0
      nUnique: 56230 == 56230
      ...
      OK
  
      >>> success #doctest: +SKIP
      True
  
      """
  
      print("Running benchmarks for %s" % self.package_name)
      self._show_system_info()
  
      argv = self._test_argv(label, verbose, extra_argv)
      argv += ["--match", r"(?:^|[\\b_\\.%s-])[Bb]ench" % os.sep]
  
      # import nose or make informative error
      nose = import_nose()
  
      # get plugin to disable doctests
      from .noseclasses import Unplugger
  
      add_plugins = [Unplugger("doctest")]
  
      return nose.run(argv=argv, addplugins=add_plugins)
  
file_path: catboost/contrib/python/numpy/py2/numpy/testing/_private/nosetester.py
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import warnings
  from numpy.compat import basestring
  import numpy
  from .utils import import_nose, suppress_warnings
label_desc: Use image node_id 7 for calling the NoseTester obj's underlying member method code with example usage: obj.bench(label, verbose, extra_argv) and returns: nose