Pillow/Tests
2023-02-25 16:44:07 +11:00
..
fonts Fix null pointer dereference crash with malformed font 2023-01-01 07:03:09 +11:00
icc
images Added support for uncompressed LA images 2022-12-23 19:07:45 +11:00
oss-fuzz Lint fixes 2023-01-01 07:03:09 +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 pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
bench_cffi_access.py Remove old Travis CI config 2020-12-19 21:57:32 +02:00
check_fli_oob.py Added context managers 2021-11-25 23:16:07 +11:00
check_fli_overflow.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
check_icns_dos.py Added context managers 2021-02-11 21:43:54 +11:00
check_imaging_leaks.py Use python3 in shebang line 2021-04-09 19:10:36 +10:00
check_j2k_dos.py Added context managers 2021-02-11 21:43:54 +11:00
check_j2k_leaks.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
check_j2k_overflow.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
check_jp2_overflow.py Added context managers 2021-11-25 23:16:07 +11:00
check_jpeg_leaks.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
check_large_memory_numpy.py pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
check_large_memory.py pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
check_libtiff_segfault.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
check_png_dos.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
conftest.py make sure we return a mark decorator 2021-04-10 12:03:15 +02:00
createfontdatachunk.py Use python3 in shebang line 2021-04-09 19:10:36 +10:00
helper.py some pylint warnings 2022-10-13 15:20:11 +13:00
README.rst Added pytest-timeout to test dependencies 2022-05-16 08:56:45 +10:00
test_000_sanity.py Do not import PIL.Image 2022-10-03 19:54:37 +11:00
test_binary.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_bmp_reference.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_box_blur.py [Test] function name should be snake_case 2022-04-11 15:29:01 +03:00
test_color_lut.py Merge pull request #6195 from hugovk/cleanup 2022-04-26 18:51:44 +10:00
test_core_resources.py pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
test_decompression_bomb.py Added GIF decompression bomb check 2022-06-30 12:47:35 +10:00
test_deprecate.py Handling for deprecations to be removed in Pillow 11 2023-01-20 14:35:11 +02:00
test_deprecated_imageqt.py Run deprecated import check before imports from other tests 2022-04-23 08:01:02 +10:00
test_features.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_file_apng.py Do not modify previous frame when calculating delta 2022-10-24 22:19:22 +11:00
test_file_blp.py Decode JPEG compressed BLP1 data in original mode 2022-10-23 15:54:55 +11:00
test_file_bmp.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_bufrstub.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_container.py Parametrize tests 2022-08-23 21:41:32 +10:00
test_file_cur.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_dcx.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_dds.py Added support for uncompressed LA images 2022-12-23 19:07:45 +11:00
test_file_eps.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_fits.py Allow comments in FITS images 2023-02-25 16:44:07 +11:00
test_file_fli.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_fpx.py Limit tile size to avoid extending outside image 2022-06-16 08:36:43 +10:00
test_file_ftex.py Use _accept check in _open 2022-02-27 14:48:36 +11:00
test_file_gbr.py Improved consistency of returning an image access object from load() 2022-02-02 11:49:31 +11:00
test_file_gd.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_gif.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_gimpgradient.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_file_gimppalette.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_gribstub.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_hdf5stub.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_icns.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_ico.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_im.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_imt.py Added IMT tests 2022-09-29 08:22:01 +10:00
test_file_iptc.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_jpeg.py Merge pull request #6853 from radarhere/child_images 2023-02-12 07:26:18 +02:00
test_file_jpeg2k.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_libtiff_small.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_libtiff.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_mcidas.py Replaced various instances of assert_image_equal with assert_image_equal_tofile 2021-02-21 22:15:56 +11:00
test_file_mic.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_mpo.py Use enumerate 2023-01-08 13:47:46 +02:00
test_file_msp.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_palm.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_file_pcd.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_file_pcx.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_file_pdf.py Parametrized test 2023-02-23 12:44:38 +01:00
test_file_pixar.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_png.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_ppm.py Write in binary format 2022-10-23 15:17:54 +11:00
test_file_psd.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_sgi.py Added test 2021-07-30 20:29:07 +10:00
test_file_spider.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_sun.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_tar.py use string for parametrization name declaration 2023-01-15 19:36:52 -06:00
test_file_tga.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_tiff_metadata.py Fixed writing int as UNDEFINED tag 2023-02-14 10:52:32 +11:00
test_file_tiff.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_wal.py Improved consistency of returning an image access object from load() 2022-02-02 11:49:31 +11:00
test_file_webp_alpha.py Assert that image is equal 2022-11-19 17:18:27 +11:00
test_file_webp_animated.py [Test] function name should be snake_case 2022-04-11 15:29:01 +03:00
test_file_webp_lossless.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_webp_metadata.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_webp.py Test invalid WebP background colors 2022-04-26 18:55:54 +10:00
test_file_wmf.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_xbm.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_file_xpm.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_file_xvthumb.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_font_bdf.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_font_crash.py Lint fixes 2023-01-01 07:03:09 +11:00
test_font_leaks.py Rename master to main 2021-10-15 17:30:05 +03:00
test_font_pcf_charsets.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_font_pcf.py test {ImageFont,TransposedFont}.getsize() deprecation 2022-07-01 11:22:47 +02:00
test_format_hsv.py Added enums 2022-01-15 09:02:31 +11:00
test_format_lab.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_access.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2022-10-30 03:17:57 +00:00
test_image_array.py Raise a warning if NumPy will not raise an error during conversion 2022-09-17 20:11:55 +10:00
test_image_convert.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_image_copy.py Parametrize tests 2022-08-23 21:41:32 +10:00
test_image_crop.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_image_draft.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_image_entropy.py Fixed bug with rounding pixels to palette 2022-06-18 04:09:41 -04:00
test_image_filter.py Raise ValueError during filter operation as well 2023-01-11 20:02:10 +11:00
test_image_frombytes.py Remove im.offset, deprecated in 2001; and fromstring and tostring, deprecated in 2013 2020-07-17 10:55:20 +03:00
test_image_fromqimage.py Deprecate support for Qt 5 (PyQt5 and PySide2). Use Qt 6 (PyQt6 or PySide6) instead. 2022-04-22 15:56:11 +03:00
test_image_getbands.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_getbbox.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_image_getcolors.py Fixed bug with rounding pixels to palette 2022-06-18 04:09:41 -04:00
test_image_getdata.py Added enums 2022-01-15 09:02:31 +11:00
test_image_getextrema.py Fixed endian handling for I;16 getextrema 2020-02-29 20:29:28 +11:00
test_image_getim.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_getpalette.py Updated tests in light of #6060 2022-02-20 23:54:12 +11:00
test_image_getprojection.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_histogram.py Fixed bug with rounding pixels to palette 2022-06-18 04:09:41 -04:00
test_image_load.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_image_mode.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_image_paste.py make @pytest.mark.parametrize annotations one line 2022-08-22 13:29:26 -05:00
test_image_point.py Manually merge radarhere's additional tests 2022-05-03 13:53:50 -07:00
test_image_putalpha.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_putdata.py Added support for I;16 modes in putdata() 2022-12-26 18:35:24 +11:00
test_image_putpalette.py Allow getpalette() to return less than 256 colors 2022-02-16 09:56:13 +11:00
test_image_quantize.py Added test 2022-06-20 09:18:05 +10:00
test_image_reduce.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_image_resample.py remove loop left from before parametrization 2023-01-07 19:16:06 +11:00
test_image_resize.py Further parametrizations 2022-08-24 10:37:40 +10:00
test_image_rotate.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_image_split.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_image_thumbnail.py Do not call load() before draft() 2022-08-26 20:33:51 +10:00
test_image_tobitmap.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_image_tobytes.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_transform.py sort colors before comparing them 2023-01-07 19:16:06 +11:00
test_image_transpose.py Parametrize tests 2022-08-23 21:41:32 +10:00
test_image.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagechops.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagecms.py Update comment 2022-06-19 15:22:02 +03:00
test_imagecolor.py Update test case 2021-09-02 15:03:03 +03:00
test_imagedraw.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagedraw2.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_imageenhance.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_imagefile.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagefont.py Merge pull request #6445 from radarhere/set_variation_by_name 2022-10-28 13:21:30 +03:00
test_imagefontctl.py update test_imagefont to use textbbox 2022-06-20 01:20:56 +01:00
test_imagegrab.py NotImplementedError will not be raised if xclip is available 2023-01-04 00:43:48 +11:00
test_imagemath.py Merge branch 'main' into main 2022-10-13 11:14:21 +02:00
test_imagemorph.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_imageops_usm.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_imageops.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagepalette.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagepath.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imageqt.py Ignore warning 2022-04-24 08:28:21 +03:00
test_imagesequence.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imageshow.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_imagestat.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagetk.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_imagewin_pointers.py Only import ctypes as needed on Windows 2022-03-19 14:46:25 +11:00
test_imagewin.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_lib_image.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_lib_pack.py Add support for unpacking 16-bit BGRA 2022-03-31 10:42:54 +01:00
test_locale.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_main.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_map.py pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
test_mode_i16.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_numpy.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_pdfparser.py add extra variable so linter doesn't split line 2023-01-07 19:16:06 +11:00
test_pickle.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_psdraw.py Corrected error in restoring sys.stdout 2021-05-07 20:44:46 +10:00
test_pyroma.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_qt_image_qapplication.py Relax roundtrip check 2023-02-24 08:39:48 +11:00
test_qt_image_toqimage.py Qt4 is no longer supported 2022-08-24 08:12:14 +10:00
test_sgi_crash.py Added context managers 2021-11-25 23:16:07 +11:00
test_shell_injection.py Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
test_tiff_crashes.py Filter out UserWarning: Truncated File Read 2021-08-24 11:03:10 +03:00
test_tiff_ifdrational.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_uploader.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_util.py [Private] class names should be CamelCase 2022-04-10 23:55:16 +03:00
test_webp_leaks.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00: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