Ticket #21068: docs-1.6.diff

File docs-1.6.diff, 1.7 KB (added by Cliff Dyer, 11 years ago)

Patch of DiscoverRunner documentation.

  • docs/topics/testing/advanced.txt

    diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
    index 2417274..be1dc6a 100644
    a b Defining a test runner  
    301301.. currentmodule:: django.test.runner
    302302
    303303A test runner is a class defining a ``run_tests()`` method. Django ships
    304 with a ``DiscoverRunner`` class that defines the default Django
    305 testing behavior. This class defines the ``run_tests()`` entry point,
    306 plus a selection of other methods that are used to by ``run_tests()`` to
    307 set up, execute and tear down the test suite.
     304with a ``DiscoverRunner`` class that defines the default Django testing
     305behavior. This class defines the ``run_tests()`` entry point, plus a
     306selection of other methods that are used to by ``run_tests()`` to set up,
     307execute and tear down the test suite.
    308308
    309309.. class:: DiscoverRunner(pattern='test*.py', top_level=None, verbosity=1, interactive=True, failfast=True, **kwargs)
    310310
     311.. versionadded:: 1.6
     312
    311313    ``DiscoverRunner`` will search for tests in any file matching ``pattern``.
    312314
    313315    ``top_level`` can be used to specify the directory containing your
    set up, execute and tear down the test suite.  
    341343Attributes
    342344~~~~~~~~~~
    343345
     346.. attribute:: DiscoverRunner.test_loader
     347
     348    This is the class that loads tests, whether from TestCases or modules or
     349    otherwise and bundles them into test suites for the runner to execute. 
     350    By default it is set to ``unittest.defaultTestLoader``.  You can override
     351    this attribute if your tests are going to be loaded in unusual ways.
     352
    344353.. attribute:: DiscoverRunner.option_list
    345354
    346355    This is the tuple of ``optparse`` options which will be fed into the
Back to Top