Pillow/Tests
Andrew Murray 50e9a92c98
Merge pull request #7794 from radarhere/type_hints
Added type hints to additional tests
2024-02-13 22:22:24 +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 Remove shebangs 2024-01-29 18:43:03 +02:00
oss-fuzz Remove shebangs 2024-01-29 18:43:03 +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 Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
check_fli_oob.py Remove shebangs 2024-01-29 18:43:03 +02:00
check_fli_overflow.py Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11: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 Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11: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 Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11:00
check_j2k_overflow.py Use Path instead of PosixPath 2024-01-23 21:42:36 +11:00
check_jp2_overflow.py Remove shebang and execute bit 2024-01-29 18:43:51 +02:00
check_jpeg_leaks.py Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11:00
check_large_memory_numpy.py Use Path instead of PosixPath 2024-01-23 21:42:36 +11:00
check_large_memory.py Use Path instead of PosixPath 2024-01-23 21:42:36 +11:00
check_libtiff_segfault.py Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11:00
check_png_dos.py Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11:00
check_release_notes.py isort Tests 2024-01-20 13:23:03 +02:00
check_wheel.py Merge branch 'main' into type_hints_check 2024-01-21 14:38:17 +11:00
conftest.py Added type hints 2024-01-21 19:18:51 +11:00
createfontdatachunk.py isort Tests 2024-01-20 13:23:03 +02:00
helper.py Added type hints 2024-02-12 09:28:53 +11:00
README.rst Added pytest-timeout to test dependencies 2022-05-16 08:56:45 +10:00
test_000_sanity.py Added type hints 2024-01-27 15:19:43 +11:00
test_binary.py Added type hints 2024-01-27 15:19:43 +11:00
test_bmp_reference.py Added type hints 2024-01-31 21:55:32 +11:00
test_box_blur.py Added type hints 2024-01-31 21:55:32 +11:00
test_color_lut.py Added type hints 2024-02-12 23:01:44 +11:00
test_core_resources.py Added type hints 2024-02-12 23:01:44 +11:00
test_decompression_bomb.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_deprecate.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_features.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_apng.py Added type hints 2024-01-31 21:55:32 +11:00
test_file_blp.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_bmp.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_bufrstub.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_container.py Added type hints 2024-01-31 21:55:32 +11:00
test_file_cur.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_dcx.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_dds.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_eps.py Added type hints 2024-02-07 19:16:28 +11:00
test_file_fits.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_fli.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_fpx.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_ftex.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_gbr.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_gd.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_gif.py Added type hints 2024-01-31 21:55:32 +11:00
test_file_gimpgradient.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_gimppalette.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_gribstub.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_hdf5stub.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_icns.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_ico.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_im.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_imt.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_iptc.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_jpeg.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_jpeg2k.py Added type hints 2024-02-07 19:16:28 +11:00
test_file_libtiff_small.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2024-02-05 17:18:52 +00:00
test_file_libtiff.py Added type hints 2024-02-07 19:16:28 +11:00
test_file_mcidas.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_mic.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_mpo.py Added type hints 2024-01-31 21:55:32 +11:00
test_file_msp.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_palm.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_pcd.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_pcx.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_pdf.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_pixar.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_png.py Added type hints 2024-02-07 19:16:28 +11:00
test_file_ppm.py Added type hints 2024-01-31 21:55:32 +11:00
test_file_psd.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_qoi.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_sgi.py Added type hints 2024-01-31 21:55:32 +11:00
test_file_spider.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_sun.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_tar.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_tga.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_tiff_metadata.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_tiff.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_wal.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_webp_alpha.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_webp_animated.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_webp_lossless.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_webp_metadata.py Added type hints 2024-02-12 23:01:44 +11:00
test_file_webp.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_wmf.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_xbm.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_file_xpm.py Added type hints 2024-01-27 15:19:43 +11:00
test_file_xvthumb.py Added type hints 2024-01-27 15:19:43 +11:00
test_font_bdf.py Added type hints 2024-01-22 18:42:43 +11:00
test_font_crash.py Added type hints 2024-01-22 18:42:43 +11:00
test_font_leaks.py Added type hints 2024-01-22 18:42:43 +11:00
test_font_pcf_charsets.py Use Path instead of PosixPath 2024-01-23 21:42:36 +11:00
test_font_pcf.py Use Path instead of PosixPath 2024-01-23 21:42:36 +11:00
test_fontfile.py Added type hints 2024-01-27 15:19:43 +11:00
test_format_hsv.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_format_lab.py Added type hints 2024-01-27 15:19:43 +11:00
test_image_access.py Use is None 2024-02-12 19:12:08 +11:00
test_image_array.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_convert.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_copy.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_crop.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_draft.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_entropy.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_filter.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_frombytes.py Added type hints 2024-01-31 21:55:32 +11:00
test_image_fromqimage.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_getbands.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_getbbox.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_getcolors.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_getdata.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_getextrema.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_getim.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_getpalette.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_getprojection.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_histogram.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_load.py Added type hints 2024-01-31 21:55:32 +11:00
test_image_mode.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_image_paste.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_point.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_putalpha.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_putdata.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_putpalette.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_quantize.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_reduce.py Added type hints 2024-02-07 19:16:28 +11:00
test_image_resample.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_resize.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2024-02-05 17:18:52 +00:00
test_image_rotate.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_split.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_thumbnail.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_tobitmap.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_tobytes.py Added type hints 2024-01-25 22:18:46 +11:00
test_image_transform.py Added type hints 2024-02-12 09:28:53 +11:00
test_image_transpose.py Added type hints 2024-01-25 22:18:46 +11:00
test_image.py Merge pull request #7794 from radarhere/type_hints 2024-02-13 22:22:24 +11:00
test_imagechops.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagecms.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2024-02-05 17:18:52 +00:00
test_imagecolor.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagedraw.py Lint fix 2024-02-07 10:19:00 +11:00
test_imagedraw2.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imageenhance.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagefile.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagefont.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagefontctl.py Added type hints 2024-02-12 23:01:44 +11:00
test_imagefontpil.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagegrab.py Merge branch 'main' into main 2024-02-05 08:56:25 +11:00
test_imagemath.py Simplified code 2024-02-07 21:02:34 +11:00
test_imagemorph.py Added type hints 2024-02-12 23:01:44 +11:00
test_imageops_usm.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imageops.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagepalette.py Added type hints 2024-02-12 23:01:44 +11:00
test_imagepath.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imageqt.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagesequence.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imageshow.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagestat.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagetk.py Added type hints 2024-01-31 21:55:32 +11:00
test_imagewin_pointers.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_imagewin.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_lib_image.py Added type hints 2024-01-27 15:19:43 +11:00
test_lib_pack.py Added type hints 2024-01-31 21:55:32 +11:00
test_locale.py Added type hints 2024-01-27 15:19:43 +11:00
test_main.py Added type hints 2024-01-27 15:19:43 +11:00
test_map.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_mode_i16.py Added type hints 2024-01-31 21:55:32 +11:00
test_numpy.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_pdfparser.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_pickle.py Added type hints 2024-02-12 23:01:44 +11:00
test_psdraw.py Added type hints 2024-02-12 23:01:44 +11:00
test_pyroma.py Added type hints 2024-01-27 15:19:43 +11:00
test_qt_image_qapplication.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_qt_image_toqimage.py Autotype tests (#7756) 2024-01-31 20:12:58 +11:00
test_sgi_crash.py Added type hints 2024-02-12 23:01:44 +11:00
test_shell_injection.py Added type hints 2024-02-12 23:01:44 +11:00
test_tiff_crashes.py Added type hints 2024-02-12 23:01:44 +11:00
test_tiff_ifdrational.py Added type hints 2024-02-12 23:01:44 +11:00
test_uploader.py Added type hints 2024-01-27 15:19:43 +11:00
test_util.py Merge branch 'main' into type-hints-replace-io.BytesIO 2024-01-28 11:22:00 +02:00
test_webp_leaks.py Added type hints 2024-01-27 15:19:43 +11: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