Pillow/Tests
Andrew Murray 6768d3aa91
Merge pull request #7497 from ZachNagengast/fix-alpha-for-overlapping-glyphs
Fix incorrect color blending for overlapping glyphs in BGRA mode
2023-12-24 19:03:28 +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 Merge pull request #7497 from ZachNagengast/fix-alpha-for-overlapping-glyphs 2023-12-24 19:03:28 +11:00
oss-fuzz Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_eps.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_jpeg.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_ppm.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_file_tiff.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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_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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image_transpose.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_image.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagechops.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagecms.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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 Merge pull request #7497 from ZachNagengast/fix-alpha-for-overlapping-glyphs 2023-12-24 19:03: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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagegrab.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagemath.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
test_imagemorph.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +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 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02: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