Pillow/Tests
Hugo van Kemenade 80a1238e2b
Simplify glob
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-04-09 22:43:36 +03:00
..
fonts
icc
images Merge pull request #7018 from radarhere/apng 2023-03-23 14:56:47 +02:00
oss-fuzz
__init__.py
32bit_segfault_check.py
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
check_large_memory.py
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
check_release_notes.py Simplify glob 2023-04-09 22:43:36 +03:00
conftest.py
createfontdatachunk.py
helper.py
README.rst
test_000_sanity.py
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_color_lut.py
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
test_file_apng.py Remove constants deprecated in 9.1.0 2023-04-06 16:11:36 +03:00
test_file_blp.py Remove constants deprecated in 9.1.0 2023-04-06 16:11:36 +03: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
test_file_cur.py
test_file_dcx.py Removed "del im" 2023-03-03 10:28:36 +02:00
test_file_dds.py
test_file_eps.py make deprecation check more specific 2023-02-07 13:58:05 -06:00
test_file_fits.py Remove FitsStubImagePlugin, deprecated in 9.1.0 2023-04-06 16:11:36 +03: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 Remove constants deprecated in 9.1.0 2023-04-06 16:11:36 +03:00
test_file_gbr.py
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
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
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 Remove JpegImagePlugin.convert_dict_qtables, deprecated in 8.3.0 2023-04-06 16:11:36 +03: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
test_file_pcd.py
test_file_pcx.py
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
test_file_webp_alpha.py
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
test_font_leaks.py
test_font_pcf_charsets.py
test_font_pcf.py
test_format_hsv.py
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
test_image_convert.py Merge pull request #6866 from radarhere/lcms2 2023-03-12 12:39:07 +02:00
test_image_copy.py
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
test_image_filter.py
test_image_frombytes.py Added memoryview support to frombytes() 2023-02-25 19:10:47 +11:00
test_image_fromqimage.py
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
test_image_getdata.py
test_image_getextrema.py
test_image_getim.py
test_image_getpalette.py
test_image_getprojection.py
test_image_histogram.py
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
test_image_point.py Remove Image.coerce_e, deprecated in 9.2.0 2023-04-06 16:11:36 +03:00
test_image_putalpha.py
test_image_putdata.py
test_image_putpalette.py
test_image_quantize.py
test_image_reduce.py
test_image_resample.py
test_image_resize.py
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
test_image_thumbnail.py
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
test_image_transpose.py
test_image.py Remove constants deprecated in 9.1.0 2023-04-06 16:11:36 +03: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 Remove constants deprecated in 9.1.0 2023-04-06 16:11:36 +03:00
test_imagecolor.py
test_imagedraw.py Split into x and y errors 2023-03-01 22:06:40 +11:00
test_imagedraw2.py
test_imageenhance.py
test_imagefile.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_imagefont.py Remove FreeTypeFont.getmask2 fill parameter, deprecated in 9.2.0 2023-04-06 16:11:36 +03:00
test_imagefontctl.py Fix up pytest.raises lambda: uses 2023-02-23 15:19:20 +02:00
test_imagegrab.py
test_imagemath.py
test_imagemorph.py
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 Remove ImagePalette size parameter, deprecated in 8.4.0 2023-04-06 16:11:36 +03: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 Remove ImageShow.Viewer.show_file file argument, deprecated in 9.1.0 2023-04-06 16:11:36 +03: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 Remove PhotoImage.paste() box parameter, deprecated in 9.2.0 2023-04-06 16:11:36 +03:00
test_imagewin_pointers.py
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
test_locale.py
test_main.py
test_map.py
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
test_pickle.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2023-02-06 19:27:19 +00:00
test_psdraw.py
test_pyroma.py
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 Fix typo 2023-04-08 10:29:28 +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
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