2014-06-27 16:44:28 +04:00
|
|
|
Pillow Tests
|
|
|
|
============
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2020-03-27 10:36:36 +03:00
|
|
|
Test scripts are named ``test_xxx.py``. Helper classes and functions can be found in ``helper.py``.
|
2013-03-16 00:47:14 +04:00
|
|
|
|
2015-03-02 01:28:24 +03:00
|
|
|
Dependencies
|
2019-08-17 13:32:24 +03:00
|
|
|
------------
|
2014-08-08 14:51:06 +04:00
|
|
|
|
2014-08-08 14:54:14 +04:00
|
|
|
Install::
|
|
|
|
|
2022-05-16 01:56:45 +03:00
|
|
|
python3 -m pip install pytest pytest-cov pytest-timeout
|
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
|
|
|
To run an individual test::
|
|
|
|
|
2019-02-03 18:34:53 +03:00
|
|
|
pytest Tests/test_image.py
|
|
|
|
|
|
|
|
Or::
|
|
|
|
|
|
|
|
pytest -k test_image.py
|
2014-08-12 17:37:49 +04:00
|
|
|
|
|
|
|
Run all the tests from the root of the Pillow source distribution::
|
|
|
|
|
2019-02-03 18:34:53 +03:00
|
|
|
pytest
|
2014-06-24 15:03:10 +04:00
|
|
|
|
2014-06-27 16:44:53 +04:00
|
|
|
Or with coverage::
|
2014-06-24 15:03:10 +04:00
|
|
|
|
2019-10-22 16:37:04 +03:00
|
|
|
pytest --cov PIL --cov Tests --cov-report term
|
2014-06-24 15:03:10 +04:00
|
|
|
coverage html
|
|
|
|
open htmlcov/index.html
|