Pillow/Tests
Andrew Murray cc16025e23
Merge pull request #4104 from radarhere/overrun
Catch buffer overruns
2019-09-30 23:33:28 +10:00
..
fonts add test for #3777 2019-06-25 22:16:00 +10:00
icc Corrected filename [ci skip] 2016-05-03 19:23:51 +10:00
images Merge pull request #4104 from radarhere/overrun 2019-09-30 23:33:28 +10:00
__init__.py Improve pytest configuration to allow specific tests as CLI args 2019-01-13 09:00:12 -08:00
32bit_segfault_check.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
bench_cffi_access.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
bench_get.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_fli_overflow.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_icns_dos.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_imaging_leaks.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_j2k_dos.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_j2k_leaks.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_j2k_overflow.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_jpeg_leaks.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_large_memory_numpy.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_large_memory.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_libtiff_segfault.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
check_png_dos.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
createfontdatachunk.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
helper.py Test show method on CIs 2019-09-21 22:28:05 +10:00
import_all.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
make_hash.py Format with Black 2019-06-13 18:53:42 +03:00
README.rst Corrected underline [ci skip] 2019-08-17 20:32:24 +10:00
test_000_sanity.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_binary.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_bmp_reference.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_box_blur.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_color_lut.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_core_resources.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_decompression_bomb.py Added decompression bomb checks 2019-09-30 18:45:13 +10:00
test_features.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_blp.py Remove unnecessary unittest.main() boilerplate from test files 2019-02-03 10:10:16 -08:00
test_file_bmp.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_bufrstub.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_container.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_cur.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_dcx.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_dds.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_eps.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_fitsstub.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_fli.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_fpx.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_ftex.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_gbr.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_gd.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_gif.py Simplifications 2019-08-24 08:10:45 +10:00
test_file_gimpgradient.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_gimppalette.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_gribstub.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_hdf5stub.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_icns.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_ico.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_im.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_iptc.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_jpeg.py Merge pull request #3965 from radarhere/truncated 2019-09-20 22:53:52 +03:00
test_file_jpeg2k.py Merge pull request #3967 from radarhere/error 2019-09-04 16:07:22 +03:00
test_file_libtiff_small.py Format with Black 2019-06-13 18:54:11 +03:00
test_file_libtiff.py Merge pull request #4034 from cgohlke/patch-1 2019-09-30 22:32:34 +10:00
test_file_mcidas.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_mic.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_mpo.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_msp.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_palm.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_pcd.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_pcx.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_pdf.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_pixar.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_png.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_ppm.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_psd.py Corrected negative seeks 2019-09-30 18:31:18 +10:00
test_file_sgi.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_spider.py spider labrec ceil 2019-09-27 22:10:49 +02:00
test_file_sun.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_tar.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_tga.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_tiff_metadata.py Corrected tag counts (#4033) 2019-09-05 22:41:16 +03:00
test_file_tiff.py Raise error if dimension is a string 2019-09-30 18:48:10 +10:00
test_file_wal.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_webp_alpha.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_webp_animated.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_webp_lossless.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_webp_metadata.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_webp.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_wmf.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_xbm.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_xpm.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_file_xvthumb.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_font_bdf.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_font_leaks.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_font_pcf.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_format_hsv.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_format_lab.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_access.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_array.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_convert.py Improved HSV conversion 2019-08-12 06:50:18 +10:00
test_image_copy.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_crop.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_draft.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_entropy.py Lint fixes 2019-06-26 19:16:36 +10:00
test_image_filter.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_frombytes.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_fromqimage.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_getbands.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_getbbox.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_getcolors.py Format with Black 2019-06-13 18:54:24 +03:00
test_image_getdata.py Format with Black 2019-06-13 18:54:24 +03:00
test_image_getextrema.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_getim.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_getpalette.py Format with Black 2019-06-13 18:54:24 +03:00
test_image_getprojection.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_histogram.py Format with Black 2019-06-13 18:54:24 +03:00
test_image_load.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_mode.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_paste.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_point.py Format with Black 2019-06-13 18:54:24 +03:00
test_image_putalpha.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_putdata.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_putpalette.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_quantize.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_resample.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_resize.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_rotate.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_split.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_thumbnail.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_tobitmap.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_tobytes.py Format with Black 2019-06-13 18:54:24 +03:00
test_image_transform.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image_transpose.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_image.py Catch buffer overruns 2019-09-30 18:45:43 +10:00
test_imagechops.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagecms.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagecolor.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagedraw.py Increased tolerance for stroke test comparison 2019-09-11 19:57:45 +10:00
test_imagedraw2.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imageenhance.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagefile.py Corrected negative seeks 2019-09-30 18:31:18 +10:00
test_imagefont_bitmap.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagefont.py Added text stroking 2019-07-29 06:40:03 +10:00
test_imagefontctl.py Added text stroking 2019-07-29 06:40:03 +10:00
test_imagegrab.py rename parameter, add note to docs 2019-09-20 17:35:08 +02:00
test_imagemath.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagemorph.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imageops_usm.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imageops.py Do not calculate the crop width if it is already known 2019-09-29 14:26:32 +10:00
test_imagepalette.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagepath.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imageqt.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagesequence.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imageshow.py Test show method on CIs 2019-09-21 22:28:05 +10:00
test_imagestat.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagetk.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagewin_pointers.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_imagewin.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_lib_image.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_lib_pack.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_locale.py Cleanup by resetting locale 2019-09-23 20:26:34 +10:00
test_main.py Fixed black formatting 2019-06-22 14:47:56 +10:00
test_map.py Changed overflow check to use PY_SSIZE_T_MAX 2019-07-17 07:07:26 +10:00
test_mode_i16.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_numpy.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_pdfparser.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_pickle.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_psdraw.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_pyroma.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_qt_image_fromqpixmap.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_qt_image_toqimage.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_qt_image_toqpixmap.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_shell_injection.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_tiff_ifdrational.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_uploader.py Format with Black 2019-06-13 18:54:46 +03:00
test_util.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
test_webp_leaks.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
threaded_save.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
versions.py Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00

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 pytest pytest-cov

Execution
---------

To run an individual test::

    pytest Tests/test_image.py

Or::

    pytest -k test_image.py

Run all the tests from the root of the Pillow source distribution::

    pytest

Or with coverage::

    pytest --cov PIL --cov-report term
    coverage html
    open htmlcov/index.html