Tox (Python Testing Wrapper)
   HOME

TheInfoList



OR:

tox is a command-line driven automated testing tool for
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
, based on the use of virtualenv. It can be used for both manually-invoked testing from the desktop, or continuous testing within continuous integration frameworks such as Jenkins or
Travis CI Travis CI is a hosted continuous integration service used to build and test software projects hosted on GitHub, Bitbucket, GitLab, Perforce, Apache Subversion and Assembla. Travis CI was the first CI service that provided services to open-sourc ...
. Its use began to become popular in the Python community from around 2015. tox acts a wrapper for both
virtual environment A virtual environment is a networked application that allows a user to interact with both the computing environment and the work of other users. Email Electronic mail (email or e-mail) is a method of exchanging messages ("mail") betwee ...
s and
test automation In software testing, test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes. Test automation can automate some repetitive bu ...
tools, to simplify the consistent testing of Python code across a range of environments. It integrates the use of a virtualisation tool, such as virtualenv, with a test script such a
Imprimatur
This gives a consistent
container A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping. Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
-based testing environment on both desktops and integration servers. It also allows testing in a range of Python environments, such as Python 2 or Python 3 specific contexts. Tox is configured through a simple tox.ini file in INI format.


Smoke testing

tox is also convenient as a simple smoke test on a newly installed, or freshly-updated system. It is also useful before beginning a
refactoring In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the '' factoring''—without changing its external behavior. Refactoring is intended to improve the design, structure ...
exercise.


References

Continuous integration Python (programming language) development tools Python (programming language) software {{computing-stub