Pillow/Tests/README.rst

41 lines
743 B
ReStructuredText
Raw Normal View History

2014-06-27 16:44:28 +04:00
Pillow Tests
============
2014-06-27 16:45:39 +04:00
Test scripts are named ``test_xxx.py`` and use the ``unittest`` module. A base class and helper functions can be found in ``helper.py``.
2015-03-02 01:28:24 +03:00
Dependencies
2014-08-08 14:51:06 +04:00
-----------
2014-08-08 14:54:14 +04:00
Install::
2017-11-02 00:31:24 +03:00
pip install pytest pytest-cov
2014-08-08 14:51:06 +04:00
2014-06-27 16:44:28 +04:00
Execution
---------
2014-08-12 17:37:49 +04:00
**If Pillow has been built in-place**
2014-08-12 17:37:49 +04:00
To run an individual test::
python Tests/test_image.py
Run all the tests from the root of the Pillow source distribution::
2017-11-02 00:31:24 +03:00
pytest -vx Tests
2014-06-27 16:44:53 +04:00
Or with coverage::
2017-11-02 00:31:24 +03:00
pytest -vx --cov PIL --cov-report term Tests
coverage html
open htmlcov/index.html
2014-08-12 17:37:49 +04:00
**If Pillow has been installed**
2014-06-27 16:44:53 +04:00
To run an individual test::
pytest -k Tests/test_image.py
2014-08-12 17:37:49 +04:00
Run all the tests from the root of the Pillow source distribution::
2017-12-13 16:49:21 +03:00
pytest