Pillow/Tests
2020-06-18 16:18:18 +03:00
..
fonts Add tests for charset aware PcfFontFile 2020-03-31 10:20:43 +02:00
icc Corrected filename [ci skip] 2016-05-03 19:23:51 +10:00
images Updated harfbuzz to 2.6.7 2020-06-14 22:23:19 +10: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 Introduce isort to automate import ordering and formatting 2019-07-06 16:11:35 -07:00
bench_cffi_access.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_fli_oob.py Format with Black 2020-04-01 09:54:26 +03:00
check_fli_overflow.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_icns_dos.py Use bytes literals instead of bytes(str) 2019-10-06 19:26:55 -07:00
check_imaging_leaks.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_j2k_dos.py Use bytes literals instead of bytes(str) 2019-10-06 19:26:55 -07:00
check_j2k_leaks.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_j2k_overflow.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
check_jp2_overflow.py Format with Black 2020-04-01 10:34:19 +03:00
check_jpeg_leaks.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_large_memory_numpy.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_large_memory.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_libtiff_segfault.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
check_png_dos.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
check_tiff_crashes.py Format with Black 2020-04-01 11:02:50 +03:00
conftest.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
createfontdatachunk.py Upgrade Python syntax with pyupgrade --py3-plus 2019-10-07 14:30:59 +03:00
helper.py move import 2020-05-25 22:21:51 +02:00
README.rst unittest is no longer used in every test [ci skip] 2020-03-27 18:36:36 +11:00
test_000_sanity.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_binary.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_bmp_reference.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_box_blur.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_color_lut.py Convert to use pytest 2020-02-22 23:03:01 +02:00
test_core_resources.py Convert to use pytest 2020-03-02 16:31:08 +02:00
test_decompression_bomb.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_features.py Merge pull request #4438 from jdufresne/warning 2020-03-02 21:26:17 +02:00
test_file_apng.py Convert from unittest to pytest 2020-03-31 22:43:31 +03:00
test_file_blp.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_file_bmp.py Replace unittest with pytest 2020-02-17 10:42:33 +02:00
test_file_bufrstub.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_container.py Return strings or bytes from ContainerIO according to the file object mode 2020-02-15 22:13:10 +11:00
test_file_cur.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_dcx.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_dds.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_eps.py Fix regression 2020-02-23 10:31:54 +02:00
test_file_fitsstub.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_fli.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_fpx.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_ftex.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_file_gbr.py Simplified test case 2020-05-17 11:04:02 +10:00
test_file_gd.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_file_gif.py Convert to use pytest 2020-02-22 23:03:01 +02: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 Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_file_gribstub.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_hdf5stub.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_icns.py Convert to use pytest 2020-02-22 23:03:01 +02:00
test_file_ico.py Convert to use pytest 2020-02-22 23:03:01 +02:00
test_file_im.py Trim end of name, keeping ext 2020-02-26 20:15:23 +11:00
test_file_iptc.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_jpeg.py Replaced primitive "magic number" inside of JpegImagePlugin._accept() function by more correct version. 2020-06-18 16:18:18 +03:00
test_file_jpeg2k.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_libtiff_small.py Convert to use pytest 2020-03-02 16:31:08 +02:00
test_file_libtiff.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_mcidas.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_mic.py Merge remote-tracking branch 'upstream/master' into pytest.importorskip 2020-02-19 19:26:52 +02:00
test_file_mpo.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_file_msp.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_palm.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_pcd.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_file_pcx.py Convert to use pytest 2020-03-02 16:31:08 +02:00
test_file_pdf.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_pixar.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_png.py Allow ImageMagick zTXt chunks to be extracted after copy() 2020-04-16 21:14:19 +10:00
test_file_ppm.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_psd.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_sgi.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_file_spider.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_sun.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_tar.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_file_tga.py Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
test_file_tiff_metadata.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_file_tiff.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_wal.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_file_webp_alpha.py Convert to use pytest 2020-02-18 15:50:34 +02:00
test_file_webp_animated.py Merge remote-tracking branch 'upstream/master' into pytest.importorskip 2020-02-19 19:26:52 +02:00
test_file_webp_lossless.py Merge remote-tracking branch 'upstream/master' into pytest.importorskip 2020-02-19 19:26:52 +02:00
test_file_webp_metadata.py Corrected reading EXIF metadata without prefix 2020-06-07 20:01:04 +10:00
test_file_webp.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_file_wmf.py Increased epsilon to pass on Windows 2020-04-26 08:03:16 +10:00
test_file_xbm.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_xpm.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_xvthumb.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_font_bdf.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_font_leaks.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_font_pcf_charsets.py Renamed variable 2020-06-06 19:42:24 +10:00
test_font_pcf.py Renamed variable 2020-06-06 19:42:24 +10:00
test_format_hsv.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_format_lab.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_access.py Converted setup and teardown methods 2020-03-04 21:31:50 +11:00
test_image_array.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_convert.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_image_copy.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_crop.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_draft.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_image_entropy.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_filter.py Run yesqa to remove redundant noqa 2020-06-06 14:54:58 +03:00
test_image_frombytes.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_fromqimage.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_image_getbands.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_getbbox.py If an alpha channel is present, only use that to get bounding box 2020-02-28 22:33:02 +11:00
test_image_getcolors.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_getdata.py Convert various tests to pytest style 2020-01-27 22:46:52 +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 Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_getprojection.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_histogram.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_load.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_mode.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_image_paste.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_image_point.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_putalpha.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_putdata.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_putpalette.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_quantize.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_reduce.py Fix broken string 2020-05-13 10:21:10 +03:00
test_image_resample.py Convert to use pytest 2020-02-22 23:03:01 +02:00
test_image_resize.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_image_rotate.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_split.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_image_thumbnail.py Fixed ZeroDivisionError in thumbnail 2020-05-15 18:29:52 +10:00
test_image_tobitmap.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_tobytes.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_transform.py Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
test_image_transpose.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_imagechops.py Updated tests 2020-02-19 19:52:07 +11:00
test_imagecms.py Run yesqa to remove redundant noqa 2020-06-06 14:54:58 +03:00
test_imagecolor.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_imagedraw.py Fixed drawing a 1px high polygon 2020-06-07 12:07:13 +10:00
test_imagedraw2.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_imageenhance.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_imagefile.py Checks over exif instead of reloeaded_exif 2020-04-28 18:58:26 +02:00
test_imagefont_bitmap.py Convert to use pytest 2020-02-22 23:03:01 +02:00
test_imagefont.py Removed test skips for MinGW 2020-06-14 23:08:21 +10:00
test_imagefontctl.py fix freetype and raqm on MSYS 2020-05-23 23:16:06 +02:00
test_imagegrab.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_imagemath.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_imagemorph.py Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
test_imageops_usm.py Converted common Qt test classes 2020-03-28 12:21:00 +11:00
test_imageops.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08:00
test_imagepalette.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_imagepath.py Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
test_imageqt.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_imagesequence.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_imageshow.py fix AppVeyor 2020-04-12 11:55:31 +10:00
test_imagestat.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_imagetk.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_imagewin_pointers.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_imagewin.py Convert to use pytest 2020-03-02 16:31:08 +02:00
test_lib_image.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_lib_pack.py Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
test_locale.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_main.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_map.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_mode_i16.py Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
test_numpy.py Added support for 1-D NumPy arrays 2020-05-04 20:07:23 +10:00
test_pdfparser.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_pickle.py Merge pull request #4565 from radarhere/tiff_pickle 2020-04-17 19:03:02 +03:00
test_psdraw.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_pyroma.py Use pytest.importorskip to skip on a missing import dependency 2020-02-18 14:30:56 +02:00
test_qt_image_fromqpixmap.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_qt_image_toqimage.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_qt_image_toqpixmap.py Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
test_sgi_crash.py Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
test_shell_injection.py Convert to use pytest 2020-03-02 16:31:08 +02:00
test_tiff_ifdrational.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_uploader.py Converted to pytest 2020-02-25 20:57:27 +11:00
test_util.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_webp_leaks.py Streamline test skipping based on supported features 2020-02-18 13:07:01 -08: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

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