Imported Upstream version 1.2.1
[platform/upstream/python-nose.git] / doc / index.rst
1 .. nose documentation master file, created by sphinx-quickstart on Thu Mar 26 16:49:00 2009.
2    You can adapt this file completely to your liking, but it should at least
3    contain the root `toctree` directive.
4
5
6 Installation and quick start
7 ============================
8
9 *On most UNIX-like systems, you'll probably need to run these commands as root
10 or using sudo.*
11
12 Install nose using setuptools/distribute::
13
14   easy_install nose
15
16 Or pip::
17
18   pip install nose
19
20 Or, if you don't have setuptools/distribute installed, use the download
21 link at right to download the source package, and install it in the
22 normal fashion: Ungzip and untar the source package, cd to the new
23 directory, and::
24
25   python setup.py install
26
27 However, **please note** that without setuptools/distribute installed,
28 you will not be able to use third-party nose plugins.
29
30 This will install the nose libraries, as well as the :doc:`nosetests <usage>`
31 script, which you can use to automatically discover and run tests.
32
33 Now you can run tests for your project::
34
35   cd path/to/project
36   nosetests
37
38 You should see output something like this::
39
40   ..................................
41   ----------------------------------------------------------------------
42   Ran 34 tests in 1.440s
43
44   OK
45
46 Indicating that nose found and ran your tests.
47
48 For help with nosetests' many command-line options, try::
49
50   nosetests -h
51
52 or visit the :doc:`usage documentation <usage>`.
53
54
55 Python3
56 =======
57
58 nose supports python3. Building from source on python3 requires
59 `distribute <http://packages.python.org/distribute/>`_. If you don't
60 have distribute installed, ``python3 setup.py install`` will install
61 it via distribute's bootstrap script.
62
63 Additionally, if your project is using `2to3
64 <http://docs.python.org/library/2to3.html>`_, ``python3 setup.py nosetests``
65 command will automatically convert your sources with 2to3 and then the
66 tests with python 3.
67
68 .. warning ::
69
70    nose itself supports python 3, but many 3rd-party plugins do not!
71
72
73 .. toctree::
74    :hidden:
75
76    testing
77    developing
78    news
79    further_reading