File: getting_started.rst

package info (click to toggle)
nose2 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,368 kB
  • ctags: 1,834
  • sloc: python: 7,899; makefile: 22
file content (68 lines) | stat: -rw-r--r-- 2,077 bytes parent folder | download | duplicates (2)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Getting started with nose2
==========================

Installation
------------

The recommended way to install nose2 is with `pip`_ ::

  pip install nose2

You can also install from source by downloading the source
distribution from `pypi`_, un-taring it, and running
``python setup.py install`` in the source directory. Note that if you
install this way, and do not have distribute or setuptools installed,
you must install nose2's dependencies manually.


Dependencies
~~~~~~~~~~~~

For Python 2.7, Python 3.2 and pypy, nose2 requires `six`_ version
1.1. For Python 2.6, nose2 also requires `argparse`_ version 1.2.1 and
`unittest2`_ version 0.5.1. When installing with pip, distribute or
setuptools, these dependencies will be installed automatically.


Development version
~~~~~~~~~~~~~~~~~~~

You can install the development version of nose2 from github with `pip`_::

  pip install -e git+git://github.com/nose-devs/nose2.git#egg=nose2

You can also download a package from github, or clone the source and install
from there with ``python setup.py install``.


Running tests
-------------

To run tests in a project, use the ``nose2`` script that is installed
with nose2::

  nose2

This will find and run tests in all packages in the current working
directory, and any sub-directories of the current working directory
whose names start with 'test'.

To find tests, nose2 looks for modules whose names start with
'test'. In those modules, nose2 will load tests from all
:class:`unittest.TestCase` subclasses, as well as functions whose
names start with 'test'.

.. todo ::

   ...  and other classes whose names start with 'Test'.


The ``nose2`` script supports a number of command-line options, as
well as extensive configuration via config files. For more information
see :doc:`usage` and :doc:`configuration`.

.. _pip : http://pypi.python.org/pypi/pip/1.0.2
.. _pypi : http://pypi.python.org/pypi
.. _six : http://pypi.python.org/pypi/six/1.1.0
.. _argparse : http://pypi.python.org/pypi/argparse/1.2.1
.. _unittest2 : http://pypi.python.org/pypi/unittest2/0.5.1