# Module: `testing.iptestcontroller`

IPython Test Process Controller

This module runs one or more subprocesses which will actually run the IPython test suite.

## 3 Classes

class `IPython.testing.iptestcontroller.``TestController`

  Bases: `object`

  Run tests in a subprocess

  `__init__`()
  `cleanup`()

    Kill process if it’s still alive, and clean up temporary directories

  `cleanup_process`()

    Cleanup on exit by killing any leftover processes.

  `print_extra_info`()

    Print extra information about this test run.

    If we’re running in parallel and showing the concise view, this is only called if the test group fails. Otherwise, it’s called before the test group is started.

    The base implementation does nothing, but it can be overridden by subclasses.

  `setup`()

    Create temporary directories etc.

    This is only called when we know the test group will be run. Things created here may be cleaned up by self.cleanup().

class `IPython.testing.iptestcontroller.``PyTestController`(section, options)

  Bases: `IPython.testing.iptestcontroller.TestController`

  Run Python tests using IPython.testing.iptest

  `__init__`(section, options)

    Create new test runner.

class `IPython.testing.iptestcontroller.``JSController`(section)

  Bases: `IPython.testing.iptestcontroller.TestController`

  Run CasperJS tests

  `__init__`(section)

    Create new test runner.

## 8 Functions

`IPython.testing.iptestcontroller.``get_js_test_dir`()

`IPython.testing.iptestcontroller.``all_js_groups`()

`IPython.testing.iptestcontroller.``prepare_controllers`(options)

  Returns two lists of TestController instances, those to run, and those not to run.

`IPython.testing.iptestcontroller.``do_run`(controller, buffer_output=True)

  Setup and run a test controller.

  If buffer_output is True, no output is displayed, to avoid it appearing interleaved. In this case, the caller is responsible for displaying test output on failure.

  Returns:

  controller : TestController

  > The same controller as passed in, as a convenience for using map() type APIs.

  exitcode : int

  > The exit code of the test subprocess. Non-zero indicates failure.

`IPython.testing.iptestcontroller.``report`()

  Return a string with a summary report of test-related variables.

`IPython.testing.iptestcontroller.``run_iptestall`(options)

  Run the entire IPython test suite by calling nose and trial.

  This function constructs `IPTester` instances for all IPython modules and package and then runs each of them. This causes the modules and packages of IPython to be tested each in their own subprocess using nose.

  Parameters:

  All parameters are passed as attributes of the options object.

  testgroups : list of str

  > Run only these sections of the test suite. If empty, run all the available sections.

  fast : int or None

  > Run the test suite in parallel, using n simultaneous processes. If None is passed, one process is used per CPU core. Default 1 (i.e. sequential)

  inc_slow : bool

  > Include slow tests, like IPython.parallel. By default, these tests aren’t run.

  xunit : bool

  > Produce Xunit XML output. This is written to multiple foo.xunit.xml files.

  coverage : bool or str

  > Measure code coverage from tests. True will store the raw coverage data, or pass ‘html’ or ‘xml’ to get reports.

  extra_args : list

  > Extra arguments to pass to the test subprocesses, e.g. ‘-v’

`IPython.testing.iptestcontroller.``default_options`()

  Get an argparse Namespace object with the default arguments, to pass to `run_iptestall()`.

`IPython.testing.iptestcontroller.``main`()