Pillow/Tests
2023-04-06 16:11:36 +03:00
..
fonts Fix null pointer dereference crash with malformed font 2023-01-01 07:03:09 +11:00
icc
images Merge pull request #7018 from radarhere/apng 2023-03-23 14:56:47 +02:00
oss-fuzz Lint fixes 2023-01-01 07:03:09 +11:00
__init__.py
32bit_segfault_check.py pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
bench_cffi_access.py
check_fli_oob.py
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
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 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
check_png_dos.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
conftest.py
createfontdatachunk.py
helper.py remove redundant default value 2023-01-28 15:35:33 +11: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
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 Apply suggestions from code review 2023-03-03 16:00:56 +02:00
test_decompression_bomb.py Fix up pytest.warns lambda: uses 2023-02-23 16:06:40 +02:00
test_deprecate.py update "unknown version" deprecation test 2023-02-06 18:00:31 -06:00
test_features.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_file_apng.py Consider transparency when applying blend mask 2023-03-16 20:05:56 +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 Fix unclosed file warnings 2023-03-11 22:39:11 +11:00
test_file_container.py Parametrize tests 2022-08-23 21:41:32 +10:00
test_file_cur.py
test_file_dcx.py Removed "del im" 2023-03-03 10:28:36 +02:00
test_file_dds.py Added support for uncompressed LA images 2022-12-23 19:07:45 +11:00
test_file_eps.py make deprecation check more specific 2023-02-07 13:58:05 -06:00
test_file_fits.py Fix unclosed file warnings 2023-03-11 22:39:11 +11:00
test_file_fli.py Removed "del im" 2023-03-03 10:28:36 +02:00
test_file_fpx.py Close OleFileIO instance when closing or exiting FPX or MIC 2023-03-11 23:11:43 +11: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
test_file_gif.py Removed "del im" 2023-03-03 10:28:36 +02:00
test_file_gimpgradient.py
test_file_gimppalette.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_file_gribstub.py Fix unclosed file warnings 2023-03-11 22:39:11 +11:00
test_file_hdf5stub.py Fix unclosed file warnings 2023-03-11 22:39:11 +11: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 Fix up pytest.warns lambda: uses 2023-02-23 16:06:40 +02:00
test_file_im.py Removed "del im" 2023-03-03 10:28:36 +02: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 Assert false instead of raising an error 2023-03-29 22:20:57 +11:00
test_file_libtiff_small.py
test_file_libtiff.py Corrected passing TIFF_LONG to libtiff 2023-04-01 12:21:16 +11:00
test_file_mcidas.py
test_file_mic.py Close OleFileIO instance when closing or exiting FPX or MIC 2023-03-11 23:11:43 +11:00
test_file_mpo.py Removed "del im" 2023-03-03 10:28:36 +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
test_file_pcx.py Parametrized tests 2022-10-03 16:57:42 +11:00
test_file_pdf.py Merge branch 'main' into pdf 2023-03-12 23:31:26 +11:00
test_file_pixar.py
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 Clear half token after use 2023-04-01 09:23:57 +11:00
test_file_psd.py Removed "del im" 2023-03-03 10:28:36 +02:00
test_file_qoi.py Removed class 2023-03-12 23:28:29 +11:00
test_file_sgi.py
test_file_spider.py Removed "del im" 2023-03-03 10:28:36 +02: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 Fix up pytest.warns lambda: uses 2023-02-23 16:06:40 +02:00
test_file_tga.py Fix up pytest.warns lambda: uses 2023-02-23 16:06:40 +02:00
test_file_tiff_metadata.py Assert value instead of assigning unused variable 2023-02-24 21:01:03 +02:00
test_file_tiff.py Merge branch 'main' into tiff 2023-03-12 22:30:15 +11: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 Round duration when saving animated WebP 2023-03-07 18:07:46 +11:00
test_file_webp_lossless.py
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 Apply suggestions from code review 2023-03-03 16:00:56 +02: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
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
test_font_crash.py Lint fixes 2023-01-01 07:03:09 +11:00
test_font_leaks.py
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
test_image_access.py Merge branch 'main' into bgr32 2023-03-25 23:45:48 +11: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 Merge pull request #6866 from radarhere/lcms2 2023-03-12 12:39:07 +02: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
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 Added memoryview support to frombytes() 2023-02-25 19:10:47 +11: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
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
test_image_getim.py
test_image_getpalette.py Updated tests in light of #6060 2022-02-20 23:54:12 +11:00
test_image_getprojection.py
test_image_histogram.py Fixed bug with rounding pixels to palette 2022-06-18 04:09:41 -04:00
test_image_load.py
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
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
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 Support creating BGR;15, BGR;16 and BGR;24 images 2023-03-20 00:30:10 +11: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 Moved conversion test to test_imagecms, to skip if lcms2 is absent 2023-01-06 20:09:47 +11:00
test_imagecolor.py
test_imagedraw.py Split into x and y errors 2023-03-01 22:06:40 +11: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 Fix up pytest.raises lambda: uses 2023-02-23 15:19:20 +02:00
test_imagefontctl.py Fix up pytest.raises lambda: uses 2023-02-23 15:19:20 +02: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
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 Remove support for PyQt5 and PySide2, deprecated in 9.2.0 2023-04-06 16:11:36 +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 Fix unclosed file warnings 2023-03-11 22:39:11 +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 Added memoryview support to Dib.frombytes() 2023-03-04 17:18:59 +11: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 Support unpacking I;16N 2022-12-28 18:57:24 +11:00
test_locale.py
test_main.py
test_map.py pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
test_mode_i16.py Merge branch 'main' into i16n 2023-03-13 14:33:26 +11:00
test_numpy.py Load before getting size in __array_interface__ 2023-03-23 10:12:18 +11: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 Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_qt_image_qapplication.py Remove support for PyQt5 and PySide2, deprecated in 9.2.0 2023-04-06 16:11:36 +03:00
test_qt_image_toqimage.py Remove support for PyQt5 and PySide2, deprecated in 9.2.0 2023-04-06 16:11:36 +03:00
test_sgi_crash.py
test_shell_injection.py
test_tiff_crashes.py
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
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