Module: testing.globalipapp — IPython 2.3.1 documentation

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# Module: `testing.globalipapp`

Global IPython app to support test running.

We must start our own ipython object and heavily muck with it so that all the modifications IPython makes to system behavior don’t send the doctest machinery into a fit. This code should be considered a gross hack, but it gets the job done.

## 2 Classes

class `IPython.testing.globalipapp.` `StreamProxy`(name)

  Bases: `IPython.utils.io.IOStream`

  Proxy for sys.stdout/err. This will request the stream at call time allowing for nose’s Capture plugin’s redirection of sys.stdout/err.

  Parameters: | name : str The name of the stream. This will be requested anew at every call

  `__init__`(name)

class `IPython.testing.globalipapp.` `py_file_finder`(test_filename)

  Bases: `object`

  `__init__`(test_filename)

## 3 Functions

`IPython.testing.globalipapp.` `get_ipython`()

`IPython.testing.globalipapp.` `xsys`(self, cmd)

  Replace the default system call with a capturing one for doctest.

`IPython.testing.globalipapp.` `start_ipython`()

  Start a global IPython shell, which we need for IPython-specific syntax.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »