class_docstr: Nose test runner.
  
  This class enables running nose tests from inside Theano,
  by calling theano.test().
  This version is more adapted to what we want than Numpy's one.
class_docstr_tok: ["Nose","test","runner",".","This","class","enables","running","nose","tests","from","inside","Theano",",","by","calling","theano.test","(",")",".","This","version","is","more","adapted","to","what","we","want","than","Numpy","'s","one","."]
docstr: Run tests for module using nose.
  
  :type verbose: int
  :param verbose: Verbosity value for test outputs, in the range 1-10.
                  Default is 1.
  
  :type extra_argv: list
  :param extra_argv: List with any extra arguments to pass to nosetests.
  
  :type coverage: bool
  :param coverage: If True, report coverage of Theano
                   code. Default is False.
  
  :type capture: bool
  :param capture: If True, capture the standard output of the tests, like
                  nosetests does in command-line. The output of failing
                  tests will be displayed at the end. Default is True.
  
  :type knownfailure: bool
  :param knownfailure: If True, tests raising KnownFailureTest will
          not be considered Errors nor Failure, but reported as
          "known failures" and treated quite like skipped tests.
          Default is True.
  
  :returns: Returns the result of running the tests as a
            ``nose.result.TextTestResult`` object.
docstr_tok: ["Run","tests","for","module","using","nose",".",":","type","verbose",":","int",":","param","verbose",":","Verbosity","value","for","test","outputs",",","in","the","range","1-10",".","Default","is","1.",":","type","extra_argv",":","list",":","param","extra_argv",":","List","with","any","extra","arguments","to","pass","to","nosetests",".",":","type","coverage",":","bool",":","param","coverage",":","If","True",",","report","coverage","of","Theano","code",".","Default","is","False",".",":","type","capture",":","bool",":","param","capture",":","If","True",",","capture","the","standard","output","of","the","tests",",","like","nosetests","does","in","command-line",".","The","output","of","failing","tests","will","be","displayed","at","the","end",".","Default","is","True",".",":","type","knownfailure",":","bool",":","param","knownfailure",":","If","True",",","tests","raising","KnownFailureTest","will","not","be","considered","Errors","nor","Failure",",","but","reported","as","``","known","failures","''","and","treated","quite","like","skipped","tests",".","Default","is","True",".",":","returns",":","Returns","the","result","of","running","the","tests","as","a","``","nose.result.TextTestResult","``","object","."]
code: def test(
      self,
      verbose=1,
      extra_argv=None,
      coverage=False,
      capture=True,
      knownfailure=True,
  ):
      """
      Run tests for module using nose.
  
      :type verbose: int
      :param verbose: Verbosity value for test outputs, in the range 1-10.
                      Default is 1.
  
      :type extra_argv: list
      :param extra_argv: List with any extra arguments to pass to nosetests.
  
      :type coverage: bool
      :param coverage: If True, report coverage of Theano
                       code. Default is False.
  
      :type capture: bool
      :param capture: If True, capture the standard output of the tests, like
                      nosetests does in command-line. The output of failing
                      tests will be displayed at the end. Default is True.
  
      :type knownfailure: bool
      :param knownfailure: If True, tests raising KnownFailureTest will
              not be considered Errors nor Failure, but reported as
              "known failures" and treated quite like skipped tests.
              Default is True.
  
      :returns: Returns the result of running the tests as a
                ``nose.result.TextTestResult`` object.
      """
      from nose.config import Config
      from nose.plugins.manager import PluginManager
      from numpy.testing.noseclasses import NumpyTestProgram
  
      # Many Theano tests suppose device=cpu, so we need to raise an
      # error if device==gpu.
      if not os.path.exists("theano/__init__.py"):
          try:
              from theano import config
  
              if config.device != "cpu":
                  raise ValueError(
                      "Theano tests must be run with device=cpu."
                      " This will also run GPU tests when possible.\n"
                      " If you want GPU-related tests to run on a"
                      " specific GPU device, and not the default one,"
                      " you should use the init_gpu_device theano flag."
                  )
          except ImportError:
              pass
  
      # cap verbosity at 3 because nose becomes *very* verbose beyond that
      verbose = min(verbose, 3)
      self._show_system_info()
  
      cwd = os.getcwd()
      if self.package_path in os.listdir(cwd):
          # The tests give weird errors if the package to test is
          # in current directory.
          raise RuntimeError(
              (
                  "This function does not run correctly when, at the time "
                  "theano was imported, the working directory was theano's "
                  "parent directory. You should exit your Python prompt, change "
                  "directory, then launch Python again, import theano, then "
                  "launch theano.test()."
              )
          )
  
      argv, plugins = self.prepare_test_args(
          verbose, extra_argv, coverage, capture, knownfailure
      )
  
      # The "plugins" keyword of NumpyTestProgram gets ignored if config is
      # specified. Moreover, using "addplugins" instead can lead to strange
      # errors. So, we specify the plugins in the Config as well.
      cfg = Config(
          includeExe=True, plugins=PluginManager(plugins=plugins)
      )
      t = NumpyTestProgram(argv=argv, exit=False, config=cfg)
      return t.result
  
file_path: Theano/theano/tests/main.py
imports: from __future__ import absolute_import, print_function, division
  import os
  import unittest
  import sys
  from numpy.testing.nosetester import NoseTester
label_desc: Use image node_id 4 for calling the TheanoNoseTester obj's underlying member method code with example usage: obj.test(verbose, extra_argv, coverage, capture, knownfailure) and returns: t