From ebe591d2d0f29061b93ac33996b2ae97768beb55 2012-04-07 23:52:47 From: MinRK Date: 2012-04-07 23:52:47 Subject: [PATCH] remove obsolete discussion of Twisted/trial from testing docs --- diff --git a/docs/source/development/testing.txt b/docs/source/development/testing.txt index 84a2c39..a48eea9 100644 --- a/docs/source/development/testing.txt +++ b/docs/source/development/testing.txt @@ -27,16 +27,12 @@ tests for that subpackage should be skipped if the dependencies are not found. This is very important so users don't get tests failing simply because they don't have dependencies. -The testing system we use is a hybrid of nose_ and Twisted's trial_ test runner. -We use both because nose detects more things than Twisted and allows for more -flexible (and lighter-weight) ways of writing tests; in particular we've +The testing system we use is an extension of the nose_ test runner. +In particular we've developed a nose plugin that allows us to paste verbatim IPython sessions and -test them as doctests, which is extremely important for us. But the parts of -IPython that depend on Twisted must be tested using trial, because only trial -manages the Twisted reactor correctly. +test them as doctests, which is extremely important for us. .. _nose: http://code.google.com/p/python-nose -.. _trial: http://twistedmatrix.com/trac/wiki/TwistedTrial For the impatient: running the tests @@ -132,13 +128,6 @@ When developing, the :option:`--pdb` and :option:`--pdb-failures` of nose are particularly useful, these drop you into an interactive pdb session at the point of the error or failure respectively. -To run Twisted-using tests, use the :command:`trial` command on a per file or -package basis: - -.. code-block:: bash - - trial IPython.kernel - .. note:: The system information summary printed above is accessible from the top @@ -317,20 +306,6 @@ problem at hand, since both work):: yield is_smaller(x, y) -Writing tests for Twisted-using code ------------------------------------- - -Tests of Twisted [Twisted]_ using code should be written by subclassing the -``TestCase`` class that comes with ``twisted.trial.unittest``. Furthermore, all -:class:`Deferred` instances that are created in the test must be properly -chained and the final one *must* be the return value of the test method. - -.. note:: - - The best place to see how to use the testing tools, are the tests for these - tools themselves, which live in :mod:`IPython.testing.tests`. - - Design requirements ===================