mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
49 lines
911 B
ReStructuredText
49 lines
911 B
ReStructuredText
Pillow Tests
|
|
============
|
|
|
|
Test scripts are named ``test_xxx.py`` and use the ``unittest`` module. A base class and helper functions can be found in ``helper.py``.
|
|
|
|
Dependencies
|
|
-----------
|
|
|
|
Install::
|
|
|
|
pip install coverage nose
|
|
|
|
If you're using Python 2.6, there's one additional dependency::
|
|
|
|
pip install unittest2
|
|
|
|
Execution
|
|
---------
|
|
|
|
**If Pillow has been built in-place**
|
|
|
|
To run an individual test::
|
|
|
|
python Tests/test_image.py
|
|
|
|
Run all the tests from the root of the Pillow source distribution::
|
|
|
|
nosetests -vx Tests/test_*.py
|
|
|
|
Or with coverage::
|
|
|
|
coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py
|
|
coverage report
|
|
coverage html
|
|
open htmlcov/index.html
|
|
|
|
**If Pillow has been installed**
|
|
|
|
To run an individual test::
|
|
|
|
./test-installed.py Tests/test_image.py
|
|
|
|
Run all the tests from the root of the Pillow source distribution::
|
|
|
|
./test-installed.py
|
|
|
|
|
|
|