index.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. Installation and quick start
  5. ============================
  6. *On most UNIX-like systems, you'll probably need to run these commands as root
  7. or using sudo.*
  8. Install nose using setuptools/distribute::
  9. easy_install nose
  10. Or pip::
  11. pip install nose
  12. Or, if you don't have setuptools/distribute installed, use the download
  13. link at right to download the source package, and install it in the
  14. normal fashion: Ungzip and untar the source package, cd to the new
  15. directory, and::
  16. python setup.py install
  17. However, **please note** that without setuptools/distribute installed,
  18. you will not be able to use third-party nose plugins.
  19. This will install the nose libraries, as well as the :doc:`nosetests <usage>`
  20. script, which you can use to automatically discover and run tests.
  21. Now you can run tests for your project::
  22. cd path/to/project
  23. nosetests
  24. You should see output something like this::
  25. ..................................
  26. ----------------------------------------------------------------------
  27. Ran 34 tests in 1.440s
  28. OK
  29. Indicating that nose found and ran your tests.
  30. For help with nosetests' many command-line options, try::
  31. nosetests -h
  32. or visit the :doc:`usage documentation <usage>`.
  33. Python3
  34. =======
  35. nose supports python3. Building from source on python3 requires
  36. `distribute <http://packages.python.org/distribute/>`_. If you don't
  37. have distribute installed, ``python3 setup.py install`` will install
  38. it via distribute's bootstrap script.
  39. Additionally, if your project is using `2to3
  40. <http://docs.python.org/library/2to3.html>`_, ``python3 setup.py nosetests``
  41. command will automatically convert your sources with 2to3 and then run the
  42. tests with python 3.
  43. .. warning ::
  44. nose itself supports python 3, but many 3rd-party plugins do not!
  45. .. toctree::
  46. :hidden:
  47. testing
  48. developing
  49. news
  50. further_reading