summaryrefslogtreecommitdiff
path: root/doc/index.txt
blob: e1bc20ef6fa6dde3cfc9754cc957729c26c9e146 (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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Welcome to the tox automation project
===============================================

vision: standardize testing in Python
---------------------------------------------

``tox`` aims to automate and standardize testing in Python.  It is part
of a larger vision of easing the packaging, testing and release process
of Python software.

What is Tox?
--------------------

Tox is a generic virtualenv_ management and test command line tool you can use for:

* checking your package installs correctly with different Python versions and
  interpreters

* running your tests in each of the environments, configuring your test tool of choice

* acting as a frontend to Continuous Integration servers, greatly
  reducing boilerplate and merging CI and shell-based testing.


Basic example
-----------------

First, install ``tox`` with ``pip install tox`` or ``easy_install tox``.
Then put basic information about your project and the test environments you
want your project to run in into a ``tox.ini`` file residing
right next to your ``setup.py`` file::

    # content of: tox.ini , put in same dir as setup.py
    [tox]
    envlist = py26,py27
    [testenv]
    deps=pytest       # install pytest in the venvs
    commands=py.test  # or 'nosetests' or ...

You can also try generating a ``tox.ini`` file automatically, by running
``tox-quickstart`` and then answering a few simple questions.

To sdist-package, install and test your project against Python2.6 and Python2.7, just type::

    tox

and watch things happening (you must have python2.6 and python2.7 installed in your
environment otherwise you will see errors).  When you run ``tox`` a second time
you'll note that it runs much faster because it keeps track of virtualenv details
and will not recreate or re-install dependencies.  You also might want to
checkout :doc:`examples` to get some more ideas.

Current features
-------------------

* **automation of tedious Python related test activities**

* **test your Python package against many interpreter and dependency configs**

    - automatic customizable (re)creation of virtualenv_ test environments

    - installs your ``setup.py`` based project into each virtual environment

    - test-tool agnostic: runs py.test, nose or unittests in a uniform manner

* :doc:`(new in 2.0) plugin system <plugins>` to modify tox execution with simple hooks.

* uses pip_ and setuptools_ by default.  Support for configuring the installer command
  through :confval:`install_command=ARGV`.

* **cross-Python compatible**: CPython-2.6, 2.7, 3.2 and higher,
  Jython and pypy_.

* **cross-platform**: Windows and Unix style environments

* **integrates with continuous integration servers** like Jenkins_
  (formerly known as Hudson) and helps you to avoid boilerplatish
  and platform-specific build-step hacks.

* **full interoperability with devpi**: is integrated with and
  is used for testing in the devpi_ system, a versatile pypi
  index server and release managing tool.

* **driven by a simple ini-style config file**

* **documented** :doc:`examples <examples>` and :doc:`configuration <config>`

* **concise reporting** about tool invocations and configuration errors

* **professionally** :doc:`supported <support>`

* supports :ref:`using different / multiple PyPI index servers  <multiindex>`


.. _pypy: http://pypy.org

.. _`tox.ini`: :doc:configfile

.. toctree::
   :hidden:

   install
   examples
   config
   config-v2
   support
   changelog
   links
   plugins
   example/result
   announce/release-0.5
   announce/release-1.0
   announce/release-1.1
   announce/release-1.2
   announce/release-1.3
   announce/release-1.4
   announce/release-1.4.3
   announce/release-1.8
   announce/release-1.9
   announce/release-2.0


.. include:: links.txt