Pillow/Tests
2024-01-16 18:49:25 +11:00
..
fonts add test for glyph alpha blending 2023-11-27 16:25:04 +01:00
icc Add end-of-file-fixer to pre-commit 2023-09-25 16:45:38 +03:00
images Test error is raised without LOAD_TRUNCATED_IMAGES 2024-01-16 18:49:25 +11:00
oss-fuzz Removed __future__ import from fuzz_font and fuzz_pillow 2023-12-29 11:23:34 +11: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
bench_cffi_access.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_fli_oob.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_fli_overflow.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_icns_dos.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_imaging_leaks.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_j2k_dos.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_j2k_leaks.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_j2k_overflow.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_jp2_overflow.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_jpeg_leaks.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_large_memory_numpy.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_large_memory.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_libtiff_segfault.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_png_dos.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_release_notes.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
check_wheel.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
conftest.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
createfontdatachunk.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
helper.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
README.rst Added pytest-timeout to test dependencies 2022-05-16 08:56:45 +10:00
test_000_sanity.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_binary.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_bmp_reference.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_box_blur.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_color_lut.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_core_resources.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_decompression_bomb.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_deprecate.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_features.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_apng.py Rename repeated seeks apng to reflect what it is rather than how it is used. 2024-01-10 16:03:42 -05:00
test_file_blp.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_bmp.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_bufrstub.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_container.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_cur.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_dcx.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_dds.py Merge pull request #7589 from radarhere/dds_rgb 2023-12-31 17:35:30 +02:00
test_file_eps.py Use "non-zero" consistently 2024-01-06 12:07:55 +11:00
test_file_fits.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_fli.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_fpx.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_ftex.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_gbr.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_gd.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_gif.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_gimpgradient.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_gimppalette.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_gribstub.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_hdf5stub.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_icns.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_ico.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_im.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_imt.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_iptc.py Merge branch 'main' into iptc 2024-01-01 15:23:08 +11:00
test_file_jpeg.py Merge pull request #7553 from bgilbert/jpeg-rgb 2024-01-01 23:55:37 +11:00
test_file_jpeg2k.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_libtiff_small.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_libtiff.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_mcidas.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_mic.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_mpo.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_msp.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_palm.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_pcd.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_pcx.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_pdf.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_pixar.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_png.py Test error is raised without LOAD_TRUNCATED_IMAGES 2024-01-16 18:49:25 +11:00
test_file_ppm.py use filename instead of f 2024-01-08 17:17:52 +01:00
test_file_psd.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_qoi.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_sgi.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_spider.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_sun.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_tar.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_tga.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_tiff_metadata.py Merge branch 'main' into tiff 2024-01-01 13:41:17 +11:00
test_file_tiff.py Merge branch 'main' into tiff 2024-01-01 13:41:17 +11:00
test_file_wal.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_webp_alpha.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_webp_animated.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_webp_lossless.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_webp_metadata.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_webp.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_wmf.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_xbm.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_xpm.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_xvthumb.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_font_bdf.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_font_crash.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_font_leaks.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_font_pcf_charsets.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_font_pcf.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_fontfile.py Raise ValueError when trying to save without bitmap 2023-12-27 12:32:35 +11:00
test_format_hsv.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_format_lab.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_access.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_array.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_convert.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_copy.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_crop.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_draft.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_entropy.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_filter.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_frombytes.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_fromqimage.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getbands.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getbbox.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getcolors.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getdata.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getextrema.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getim.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getpalette.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_getprojection.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_histogram.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_load.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_mode.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_paste.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_point.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_putalpha.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_putdata.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_putpalette.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_quantize.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_reduce.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_resample.py Use "non-zero" consistently 2024-01-06 12:07:55 +11:00
test_image_resize.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_rotate.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_split.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_thumbnail.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_tobitmap.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_tobytes.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_transform.py Added identity tests for Transform classes 2024-01-08 10:36:30 +11:00
test_image_transpose.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image.py Merge pull request #7566 from radarhere/exit 2023-12-31 17:37:43 +02:00
test_imagechops.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagecms.py Update Tests/test_imagecms.py 2024-01-11 02:08:46 +01:00
test_imagecolor.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagedraw.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagedraw2.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imageenhance.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagefile.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagefont.py Apply ImageFont.MAX_STRING_LENGTH to ImageFont.getmask() 2023-12-31 23:17:28 +11:00
test_imagefontctl.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagefontpil.py do not crop ImageFont glyphs from negative coordinates 2024-01-01 11:35:42 +01:00
test_imagegrab.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagemath.py Include further builtins 2023-12-30 09:30:12 +11:00
test_imagemorph.py Remove unused create_lut() 2023-12-31 20:06:40 +02:00
test_imageops_usm.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imageops.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagepalette.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagepath.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imageqt.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagesequence.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imageshow.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagestat.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagetk.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagewin_pointers.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagewin.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_lib_image.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_lib_pack.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_locale.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_main.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_map.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_mode_i16.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_numpy.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_pdfparser.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_pickle.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_psdraw.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_pyroma.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_qt_image_qapplication.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_qt_image_toqimage.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_sgi_crash.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_shell_injection.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_tiff_crashes.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_tiff_ifdrational.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_uploader.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_util.py use _util.DeferredError.new everywhere 2023-12-27 14:55:30 +01:00
test_webp_leaks.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00

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

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