Pillow/Tests
Andrew Murray 1fb1bec0e8 Added test
2021-11-29 17:49:19 +11:00
..
fonts
icc
images
oss-fuzz
__init__.py
32bit_segfault_check.py
bench_cffi_access.py
check_fli_oob.py
check_fli_overflow.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_icns_dos.py
check_imaging_leaks.py
check_j2k_dos.py
check_j2k_leaks.py
check_j2k_overflow.py
check_jp2_overflow.py
check_jpeg_leaks.py
check_large_memory_numpy.py
check_large_memory.py
check_libtiff_segfault.py
check_png_dos.py Upgrade Python syntax for 3.6+ 2020-07-30 10:09:18 +03:00
conftest.py
createfontdatachunk.py
helper.py
README.rst
test_000_sanity.py
test_binary.py
test_bmp_reference.py
test_box_blur.py
test_color_lut.py
test_core_resources.py
test_decompression_bomb.py Reset MAX_IMAGE_PIXELS after each test to allow for random test order 2021-06-10 13:17:57 +10:00
test_features.py
test_file_apng.py
test_file_blp.py
test_file_bmp.py
test_file_bufrstub.py
test_file_container.py
test_file_cur.py
test_file_dcx.py Changed zero length assertions to falsy 2021-02-11 13:48:31 +11:00
test_file_dds.py
test_file_eps.py
test_file_fitsstub.py Resolved FIXME by reading mandatory FITS header items 2021-04-14 22:48:27 +10:00
test_file_fli.py FLI tests for Oss-fuzz crash. 2021-09-02 15:02:27 +03:00
test_file_fpx.py
test_file_ftex.py
test_file_gbr.py
test_file_gd.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_file_gif.py Added test 2021-11-29 17:49:19 +11:00
test_file_gimpgradient.py
test_file_gimppalette.py
test_file_gribstub.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_hdf5stub.py
test_file_icns.py Corrected file length in header 2021-11-20 14:17:42 +11:00
test_file_ico.py
test_file_im.py
test_file_iptc.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_jpeg.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_file_jpeg2k.py
test_file_libtiff_small.py
test_file_libtiff.py
test_file_mcidas.py
test_file_mic.py
test_file_mpo.py
test_file_msp.py
test_file_palm.py
test_file_pcd.py
test_file_pcx.py
test_file_pdf.py Do not round dimensions when saving PDF 2021-05-01 12:13:09 +10:00
test_file_pixar.py
test_file_png.py
test_file_ppm.py Added context managers 2021-08-24 23:43:38 +10:00
test_file_psd.py PSD layer count may be negative 2021-07-15 19:38:26 +10:00
test_file_sgi.py
test_file_spider.py
test_file_sun.py Replaced various instances of assert_image_equal with assert_image_equal_tofile 2021-02-21 22:15:56 +11:00
test_file_tar.py
test_file_tga.py
test_file_tiff_metadata.py
test_file_tiff.py
test_file_wal.py
test_file_webp_alpha.py
test_file_webp_animated.py
test_file_webp_lossless.py
test_file_webp_metadata.py
test_file_webp.py
test_file_wmf.py
test_file_xbm.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_file_xpm.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_file_xvthumb.py
test_font_bdf.py
test_font_leaks.py
test_font_pcf_charsets.py
test_font_pcf.py
test_format_hsv.py
test_format_lab.py
test_image_access.py
test_image_array.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
test_image_convert.py Merge pull request #5606 from radarhere/convert_transparency 2021-08-13 13:18:39 +03:00
test_image_copy.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_crop.py
test_image_draft.py
test_image_entropy.py
test_image_filter.py
test_image_frombytes.py
test_image_fromqimage.py
test_image_getbands.py
test_image_getbbox.py
test_image_getcolors.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_getdata.py
test_image_getextrema.py
test_image_getim.py
test_image_getpalette.py
test_image_getprojection.py
test_image_histogram.py
test_image_load.py
test_image_mode.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_image_paste.py
test_image_point.py
test_image_putalpha.py
test_image_putdata.py
test_image_putpalette.py
test_image_quantize.py
test_image_reduce.py
test_image_resample.py
test_image_resize.py Added context managers 2021-11-25 23:16:07 +11:00
test_image_rotate.py
test_image_split.py
test_image_thumbnail.py conditional mark for valgrind ignore 2021-04-09 23:53:24 +02:00
test_image_tobitmap.py
test_image_tobytes.py
test_image_transform.py
test_image_transpose.py
test_image.py
test_imagechops.py
test_imagecms.py
test_imagecolor.py
test_imagedraw.py
test_imagedraw2.py Replaced various instances of assert_image_similar with assert_image_similar_tofile 2021-02-21 22:22:29 +11:00
test_imageenhance.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_imagefile.py
test_imagefont.py
test_imagefontctl.py
test_imagegrab.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_imagemath.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_imagemorph.py
test_imageops_usm.py
test_imageops.py
test_imagepalette.py
test_imagepath.py
test_imageqt.py Ensure file is closed if it is opened by ImageQt.ImageQt 2021-03-08 20:38:03 +11:00
test_imagesequence.py
test_imageshow.py Added IPythonViewer 2021-03-04 08:55:24 +11:00
test_imagestat.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_imagetk.py
test_imagewin_pointers.py
test_imagewin.py
test_lib_image.py
test_lib_pack.py
test_locale.py
test_main.py
test_map.py
test_mode_i16.py
test_numpy.py
test_pdfparser.py
test_pickle.py
test_psdraw.py
test_pyroma.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_qt_image_qapplication.py
test_qt_image_toqimage.py
test_sgi_crash.py
test_shell_injection.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_tiff_crashes.py
test_tiff_ifdrational.py
test_uploader.py
test_util.py
test_webp_leaks.py

Pillow Tests
============

Test scripts are named ``test_xxx.py``. Helper classes and functions can be found in ``helper.py``.

Dependencies
------------

Install::

    python3 -m 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 Tests --cov-report term
    coverage html
    open htmlcov/index.html