Pillow/Tests
2021-11-21 14:14:41 +02:00
..
fonts Fix Memory DOS in ImageFont 2021-04-01 17:17:27 +03:00
icc
images Merge pull request #5829 from radarhere/tga_orientation 2021-11-21 14:14:41 +02:00
oss-fuzz [pre-commit.ci] auto fixes from pre-commit.com hooks 2021-08-25 14:52:20 +00:00
__init__.py
32bit_segfault_check.py Use python3 in shebang line 2021-04-09 19:10:36 +10:00
bench_cffi_access.py
check_fli_oob.py Use python3 in shebang line 2021-04-09 19:10:36 +10:00
check_fli_overflow.py
check_icns_dos.py
check_imaging_leaks.py Use python3 in shebang line 2021-04-09 19:10:36 +10:00
check_j2k_dos.py
check_j2k_leaks.py
check_j2k_overflow.py
check_jp2_overflow.py Use python3 in shebang line 2021-04-09 19:10:36 +10:00
check_jpeg_leaks.py
check_large_memory_numpy.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
check_large_memory.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
check_libtiff_segfault.py
check_png_dos.py
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 lint stuff 2021-04-10 16:58:01 +02:00
README.rst
test_000_sanity.py
test_binary.py
test_bmp_reference.py
test_box_blur.py
test_color_lut.py
test_core_resources.py
test_decompression_bomb.py Reset MAX_IMAGE_PIXELS after each test to allow for random test order 2021-06-10 13:17:57 +10:00
test_features.py Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
test_file_apng.py Fixed using info dictionary when writing multiple frames 2021-07-13 23:02:23 +10:00
test_file_blp.py Review, typos and lint 2021-04-01 17:41:46 +03:00
test_file_bmp.py Removed DPI rounding when BMP loading 2021-05-07 20:50:18 +10:00
test_file_bufrstub.py
test_file_container.py
test_file_cur.py
test_file_dcx.py
test_file_dds.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
test_file_eps.py Added "transparency" argument to load() 2021-07-19 09:08:45 +10:00
test_file_fitsstub.py Resolved FIXME by reading mandatory FITS header items 2021-04-14 22:48:27 +10:00
test_file_fli.py FLI tests for Oss-fuzz crash. 2021-09-02 15:02:27 +03:00
test_file_fpx.py
test_file_ftex.py
test_file_gbr.py
test_file_gd.py
test_file_gif.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_file_gimpgradient.py
test_file_gimppalette.py
test_file_gribstub.py
test_file_hdf5stub.py
test_file_icns.py Corrected file length in header 2021-11-20 14:17:42 +11:00
test_file_ico.py Read AND mask from end 2021-08-10 07:04:36 +10:00
test_file_im.py
test_file_iptc.py
test_file_jpeg.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_file_jpeg2k.py Determine mode purely from ihdr header box 2021-08-05 01:06:01 +10:00
test_file_libtiff_small.py
test_file_libtiff.py Block tile TIFF tags when saving 2021-11-18 22:01:53 +11:00
test_file_mcidas.py
test_file_mic.py
test_file_mpo.py
test_file_msp.py
test_file_palm.py Removed CONVERT helper variables 2021-03-22 19:50:06 +00:00
test_file_pcd.py
test_file_pcx.py
test_file_pdf.py Do not round dimensions when saving PDF 2021-05-01 12:13:09 +10:00
test_file_pixar.py
test_file_png.py Added warning if defusedxml is not found 2021-06-30 11:29:13 +10:00
test_file_ppm.py
test_file_psd.py PSD layer count may be negative 2021-07-15 19:38:26 +10:00
test_file_sgi.py Added test 2021-07-30 20:29:07 +10:00
test_file_spider.py
test_file_sun.py
test_file_tar.py
test_file_tga.py Added support for top right and bottom right orientations 2021-11-11 21:53:28 +11:00
test_file_tiff_metadata.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
test_file_tiff.py Merge branch 'master' into tiff_exif 2021-09-07 06:33:37 +10:00
test_file_wal.py Added WalImageFile class 2021-07-18 12:35:27 +10:00
test_file_webp_alpha.py
test_file_webp_animated.py Only set info transparency on first frame 2021-03-17 00:24:57 +11:00
test_file_webp_lossless.py
test_file_webp_metadata.py lint stuff 2021-04-10 16:58:01 +02:00
test_file_webp.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_file_wmf.py Removed WMF DPI rounding 2021-05-06 20:08:54 +10:00
test_file_xbm.py
test_file_xpm.py
test_file_xvthumb.py
test_font_bdf.py
test_font_leaks.py Rename master to main 2021-10-15 17:30:05 +03:00
test_font_pcf_charsets.py
test_font_pcf.py
test_format_hsv.py
test_format_lab.py
test_image_access.py Added specific error messages when ink has incorrect number of bands 2021-05-19 20:19:57 +10:00
test_image_array.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
test_image_convert.py Merge pull request #5606 from radarhere/convert_transparency 2021-08-13 13:18:39 +03:00
test_image_copy.py
test_image_crop.py
test_image_draft.py
test_image_entropy.py
test_image_filter.py
test_image_frombytes.py
test_image_fromqimage.py
test_image_getbands.py
test_image_getbbox.py
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
test_image_paste.py Do not alter pixels outside mask when drawing text on an image with transparency 2021-04-29 23:08:25 +10:00
test_image_point.py pre-commit autoupdate --freeze 2021-08-12 21:50:09 +10:00
test_image_putalpha.py
test_image_putdata.py
test_image_putpalette.py Fixed generated palettes 2021-07-29 16:20:20 +10:00
test_image_quantize.py Copy Python palette to new image in quantize() 2021-08-31 00:33:10 +10:00
test_image_reduce.py
test_image_resample.py lint stuff 2021-04-10 16:58:01 +02:00
test_image_resize.py Merge pull request #5367 from radarhere/quant 2021-06-20 21:57:05 +03:00
test_image_rotate.py Speed up rotating square images by 90 or 270 degrees 2021-07-30 19:57:09 +10:00
test_image_split.py
test_image_thumbnail.py conditional mark for valgrind ignore 2021-04-09 23:53:24 +02:00
test_image_tobitmap.py
test_image_tobytes.py
test_image_transform.py Copy palette to new image in transform() 2021-07-31 22:49:16 +10:00
test_image_transpose.py
test_image.py Drop support for EOL Python 3.6 2021-10-19 15:34:52 +03:00
test_imagechops.py
test_imagecms.py
test_imagecolor.py Update test case 2021-09-02 15:03:03 +03:00
test_imagedraw.py Added width argument to polygon 2021-11-16 22:02:54 +11:00
test_imagedraw2.py
test_imageenhance.py
test_imagefile.py Removed ImageFile.raise_ioerror 2021-10-18 11:06:02 +11:00
test_imagefont.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_imagefontctl.py Remove support for FreeType 2.7 and older 2021-10-18 09:29:53 +03:00
test_imagegrab.py
test_imagemath.py Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
test_imagemorph.py Changed incorrect mode errors to ValueError 2021-04-18 14:47:05 +10:00
test_imageops_usm.py
test_imageops.py Instead of drawing border, calculate palette index before image creation in expand() 2021-07-16 20:58:32 +10:00
test_imagepalette.py Fix ResourceWarning: unclosed file 2021-08-24 10:58:02 +03:00
test_imagepath.py
test_imageqt.py Ensure file is closed if it is opened by ImageQt.ImageQt 2021-03-08 20:38:03 +11:00
test_imagesequence.py
test_imageshow.py
test_imagestat.py
test_imagetk.py
test_imagewin_pointers.py
test_imagewin.py
test_lib_image.py
test_lib_pack.py Add Tests and support for Planar Tiff Images 2021-03-28 15:03:37 +02:00
test_locale.py
test_main.py
test_map.py Avoid DecompressionBombWarning: Image size (151587072 pixels) exceeds limit of 89478485 pixels, could be decompression bomb DOS attack. 2021-08-24 11:19:45 +03:00
test_mode_i16.py
test_numpy.py
test_pdfparser.py
test_pickle.py Add support for pickling TrueType fonts 2021-11-10 14:34:20 +02:00
test_psdraw.py Corrected error in restoring sys.stdout 2021-05-07 20:44:46 +10:00
test_pyroma.py
test_qt_image_qapplication.py Moved RGB fix inside ImageQt class 2021-03-10 13:17:19 +11:00
test_qt_image_toqimage.py
test_sgi_crash.py Removed shebang line 2021-04-09 19:10:53 +10:00
test_shell_injection.py
test_tiff_crashes.py Filter out UserWarning: Truncated File Read 2021-08-24 11:03:10 +03:00
test_tiff_ifdrational.py Convert to float for comparison with float in IFDRational __eq__ 2021-05-10 08:36:45 +10:00
test_uploader.py
test_util.py
test_webp_leaks.py

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

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