summaryrefslogtreecommitdiff
path: root/doc/setuptools_integration.rst
blob: b886e76c5bea5598f97101359b3af7ae04259727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Setuptools integration
======================

.. warning :: Please note that when run under the setuptools test command,
              many plugins will not be available, including the builtin
              coverage and profiler plugins. If you want to access to all
              available plugins, use the :doc:`nosetests <api/commands>`
              command instead.

nose may be used with the setuptools_ test command. Simply specify
nose.collector as the test suite in your setup file::

  setup (
      # ...
      test_suite = 'nose.collector'
  )

Then to find and run tests, you can run::

  python setup.py test

When running under setuptools, you can configure nose settings via the
environment variables detailed in the nosetests script usage message,
or the setup.cfg, ~/.noserc or ~/.nose.cfg config files.

`nosetests` command
-------------------

nose also includes its own setuptools command, ``nosetests``, that provides
support for all plugins and command line options. It works just like the
``test`` command::

  python setup.py nosetests

See :doc:`api/commands` for more information about the ``nosetests`` command.

.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools