IPython Documentation

Table Of Contents

Previous topic

testing.globalipapp

Next topic

testing.ipunittest

This Page

testing.iptest

Module: testing.iptest

Inheritance diagram for IPython.testing.iptest:

IPython Test Suite Runner.

This module provides a main entry point to a user script to test IPython itself from the command line. There are two ways of running this script:

  1. With the syntax iptest all. This runs our entire test suite by calling this script (with different arguments) recursively. This causes modules and package to be tested in different processes, using nose or trial where appropriate.
  2. With the regular nose syntax, like iptest -vvs IPython. In this form the script simply calls nose, but with special command line flags and plugins loaded.

Class

IPTester

class IPython.testing.iptest.IPTester(runner='iptest', params=None)

Bases: object

Call that calls iptest or trial in a subprocess.

__init__(runner='iptest', params=None)

Create new test runner.

call_args = None

list, arguments of system call to be made to call test runner

params = None

list, parameters for test runner

pids = None

list, process ids of subprocesses we start (for cleanup)

run()

Run the stored commands

runner = None

string, name of test runner that will be called

Functions

IPython.testing.iptest.main()
IPython.testing.iptest.make_exclude()

Make patterns of modules and packages to exclude from testing.

For the IPythonDoctest plugin, we need to exclude certain patterns that cause testing problems. We should strive to minimize the number of skipped modules, since this means untested code.

These modules and packages will NOT get scanned by nose at all for tests.

IPython.testing.iptest.make_runners()

Define the top-level packages that need to be tested.

IPython.testing.iptest.report()

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

IPython.testing.iptest.run_iptest()

Run the IPython test suite using nose.

This function is called when this script is not called with the form iptest all. It simply calls nose with appropriate command line flags and accepts all of the standard nose arguments.

IPython.testing.iptest.run_iptestall()

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 or twisted.trial appropriately.

IPython.testing.iptest.test_for(mod, min_version=None)

Test to see if mod is importable.