docstr: Configure `test` object to set test context
  
  We set the numpy / scipy standard doctest namespace
  
  Parameters
  ----------
  test : test object
      with ``globs`` dictionary defining namespace
  
  Returns
  -------
  None
  
  Notes
  -----
  `test` object modified in place
docstr_tok: ["Configure","`","test","`","object","to","set","test","context","We","set","the","numpy","\/","scipy","standard","doctest","namespace","Parameters","--","--","--","--","--","test",":","test","object","with","``","globs","``","dictionary","defining","namespace","Returns","--","--","--","-","None","Notes","--","--","-","`","test","`","object","modified","in","place"]
code: def set_test_context(self, test):
      """Configure `test` object to set test context
  
      We set the numpy / scipy standard doctest namespace
  
      Parameters
      ----------
      test : test object
          with ``globs`` dictionary defining namespace
  
      Returns
      -------
      None
  
      Notes
      -----
      `test` object modified in place
      """
      # set the namespace for tests
      pkg_name = get_package_name(os.path.dirname(test.filename))
  
      # Each doctest should execute in an environment equivalent to
      # starting Python and executing "import numpy as np", and,
      # for SciPy packages, an additional import of the local
      # package (so that scipy.linalg.basic.py's doctests have an
      # implicit "from scipy import linalg" as well.
      #
      # Note: __file__ allows the doctest in NoseTester to run
      # without producing an error
      test.globs = {
          "__builtins__": __builtins__,
          "__file__": "__main__",
          "__name__": "__main__",
          "np": numpy,
      }
      # add appropriate scipy import for SciPy tests
      if "scipy" in pkg_name:
          p = pkg_name.split(".")
          p2 = p[-1]
          test.globs[p2] = __import__(pkg_name, test.globs, {}, [p2])
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import doctest
  import inspect
  import numpy
  import nose
  from nose.plugins import doctests
  from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin
  from nose.plugins.base import Plugin
  from nose.util import src
  from .nosetester import get_package_name
  from .utils import KnownFailureException, KnownFailureTest
label_desc: Use image node_id 3 for calling the NumpyDoctest obj's underlying member method code with example usage: obj.set_test_context(test) without return types