Pillow/Tests
Hugo van Kemenade 2d4b4576aa
Merge pull request #4428 from jdufresne/use-mock
Replace SimplePatcher with builtin unittest.mock module
2020-02-18 16:08:28 +02:00
..
fonts
icc
images Merge pull request #4334 from radarhere/outline_width 2020-02-15 14:30:12 +02:00
__init__.py
32bit_segfault_check.py
bench_cffi_access.py
check_fli_overflow.py
check_icns_dos.py
check_imaging_leaks.py
check_j2k_dos.py
check_j2k_leaks.py
check_j2k_overflow.py
check_jpeg_leaks.py
check_large_memory_numpy.py
check_large_memory.py
check_libtiff_segfault.py
check_png_dos.py
conftest.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
createfontdatachunk.py
helper.py Simplify command discovery with stdlib shutil.which() 2020-02-14 14:55:46 -08:00
README.rst
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 Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_box_blur.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_color_lut.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_core_resources.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_decompression_bomb.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_features.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_blp.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_bmp.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_bufrstub.py Convert some tests to pytest style 2020-01-18 12:12:10 -08: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 Remove commas 2020-02-15 16:21:37 +02:00
test_file_eps.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_fitsstub.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_fli.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_fpx.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_ftex.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_gbr.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_gd.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_file_gif.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +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 Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_hdf5stub.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_icns.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_ico.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_im.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_iptc.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_file_jpeg.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_file_jpeg2k.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_file_libtiff_small.py
test_file_libtiff.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_file_mcidas.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_mic.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_mpo.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_msp.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_palm.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_pcd.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_pcx.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_pdf.py
test_file_pixar.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_png.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_ppm.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_psd.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_sgi.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_spider.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_sun.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_tar.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_file_tga.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_tiff_metadata.py Merge pull request #4390 from jdufresne/resource-warning 2020-02-12 17:10:51 +02:00
test_file_tiff.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02: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 most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_webp_animated.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_webp_lossless.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_file_webp_metadata.py
test_file_webp.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
test_file_wmf.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02: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 Simplified conditions 2019-12-25 15:32:38 +11:00
test_font_pcf.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_format_hsv.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_format_lab.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_access.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_image_array.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_image_convert.py Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02: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 Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_entropy.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_filter.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_frombytes.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_fromqimage.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_image_getbands.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_image_getbbox.py Convert some tests to pytest style 2020-01-18 12:12:10 -08: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 Convert various tests to pytest style 2020-01-27 22:46:52 +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 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02: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 Remove unnecessary coerce to float 2020-01-26 06:33:18 -08:00
test_image_resample.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_image_resize.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_image_rotate.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image_split.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_image_thumbnail.py Replace unittest with pytest 2020-02-13 12:15:05 +02: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 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_image_transpose.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_image.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_imagechops.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_imagecms.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_imagecolor.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_imagedraw.py Restored test 2020-02-16 13:44:34 +11:00
test_imagedraw2.py Move safe imports to the top of test files 2020-02-17 10:49:27 -08:00
test_imageenhance.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_imagefile.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imagefont_bitmap.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imagefont.py Replace SimplePatcher with builtin unittest.mock module 2020-02-17 10:06:19 -08:00
test_imagefontctl.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imagegrab.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imagemath.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_imagemorph.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imageops_usm.py
test_imageops.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_imagepalette.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imagepath.py
test_imageqt.py
test_imagesequence.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_imageshow.py Corrected skip condition 2020-01-28 19:59:41 +11: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
test_lib_image.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_lib_pack.py Concatenate string literals on same line 2019-12-26 17:08:36 +02: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 Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_mode_i16.py
test_numpy.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_pdfparser.py Replace unittest with pytest 2020-02-13 12:15:05 +02:00
test_pickle.py Remove testing of Python-2-only cPickle module 2020-02-17 10:27:36 -08:00
test_psdraw.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_pyroma.py Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
test_qt_image_fromqpixmap.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_qt_image_toqimage.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_qt_image_toqpixmap.py
test_shell_injection.py
test_tiff_ifdrational.py
test_uploader.py Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
test_util.py Convert some tests to pytest style 2020-01-18 12:12:10 -08:00
test_webp_leaks.py

Pillow Tests
============

Test scripts are named ``test_xxx.py`` and use the ``unittest`` module. A base class and helper functions can be found in ``helper.py``.

Dependencies
------------

Install::

    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