Pillow/Tests
2016-06-30 20:16:54 +01:00
..
fonts Testcase added. 2015-01-07 21:38:35 -08:00
icc Corrected filename [ci skip] 2016-05-03 19:23:51 +10:00
images Merge pull request #1846 from wiredfool/pr_1826 2016-06-30 15:23:24 +01:00
32bit_segfault_check.py flake8 2014-08-28 14:44:19 +03:00
bench_cffi_access.py Various Flake8 fixes 2015-04-24 09:26:52 +10:00
bench_get.py Flake8 fixes 2015-08-25 22:27:18 +10:00
check_fli_overflow.py Health fixes 2016-04-01 21:49:30 +11:00
check_icns_dos.py flake8 2014-08-28 14:44:19 +03:00
check_imaging_leaks.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
check_j2k_dos.py flake8 2014-08-28 14:44:19 +03:00
check_j2k_leaks.py Removed or commented unused variables 2015-04-24 16:02:38 +10:00
check_j2k_overflow.py move overflow test to check, it is a DOS on 32bit machines 2016-06-30 06:28:29 -07:00
check_jpeg_leaks.py Changed lines to be below 80 characters 2015-12-02 16:41:26 +11:00
check_large_memory_numpy.py rename large memory tests to remove test from name 2016-06-30 07:30:38 -07:00
check_large_memory.py rename large memory tests to remove test from name 2016-06-30 07:30:38 -07:00
check_libtiff_segfault.py Health fixes 2016-04-01 21:49:30 +11:00
check_png_dos.py ignore large text blocks in PNG if LOAD_TRUNCATED_IMAGES is enabled 2016-06-20 17:33:10 +03:00
check_webp_leaks.py Removed or commented unused variables 2015-04-24 16:02:38 +10:00
helper.py Restore legacy TIFF API. 2015-09-11 22:39:37 +01:00
import_all.py Flake8 fixes 2015-08-25 22:27:18 +10:00
make_hash.py support for La mode 2016-05-26 15:15:08 +03:00
README.rst Fixed typo in Tests README.rst 2015-03-02 09:28:24 +11:00
test_000_sanity.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_binary.py Various Flake8 fixes 2015-04-24 09:26:52 +10:00
test_bmp_reference.py Minor grammar fix 2016-04-14 00:08:44 +10:00
test_box_blur.py accept RGBa and La modes for blur 2016-05-27 03:16:48 +03:00
test_cffi.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_decompression_bomb.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_features.py Test unsupported features 2015-05-15 11:42:36 +03:00
test_file_bmp.py Removing all transparency from the test image 2016-04-29 21:17:18 +01:00
test_file_bufrstub.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_cur.py Throw TypeError if no cursors were found in .cur file 2015-11-26 19:56:41 +11:00
test_file_dcx.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_dds.py Health fixes 2016-04-01 21:49:30 +11:00
test_file_eps.py test the output for a CMYK EPS image 2016-05-26 22:06:10 +01:00
test_file_fitsstub.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_fli.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_fpx.py Added FPX test 2016-01-23 13:50:17 +11:00
test_file_ftex.py Health fixes 2016-04-01 21:49:30 +11:00
test_file_gbr.py Health fixes 2016-04-01 21:49:30 +11:00
test_file_gif.py Added support for GIF comment extension 2016-05-07 13:57:40 +10:00
test_file_gimpgradient.py Restore legacy TIFF API. 2015-09-11 22:39:37 +01:00
test_file_gimppalette.py More GIMP palette tests 2015-07-01 14:28:34 +03:00
test_file_gribstub.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_hdf5stub.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_icns.py Fix test according to original: 689f28aae7 (diff-d48d995756d16b9d9b8151e27377a37dR25) 2015-05-05 19:38:10 +03:00
test_file_ico.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_im.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_iptc.py Removed unused test helper 2016-04-17 23:27:09 +10:00
test_file_jpeg.py Skip extra 0xff00 in jpeg 2016-06-22 13:36:23 -07:00
test_file_jpeg2k.py Fix for UnboundLocalError with corrupt jpeg2k file 2016-03-26 13:41:00 -07:00
test_file_libtiff_small.py Further health fixes 2015-04-24 18:24:52 +10:00
test_file_libtiff.py Skip tests that require libtiff if it is not installed, fixes #1866 2016-05-06 09:07:00 -07:00
test_file_mcidas.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_mic.py Added MIC test 2016-01-23 13:46:36 +11:00
test_file_mpo.py Added is_animated 2015-06-30 13:25:00 +10:00
test_file_msp.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_palm.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_file_pcd.py Health fixes 2016-04-01 21:49:30 +11:00
test_file_pcx.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_pdf.py Added PDF multipage saving 2015-09-29 22:51:52 +10:00
test_file_png.py Merge pull request #1991 from kkopachev/png-crc-error-ignore 2016-06-30 17:25:04 +04:00
test_file_ppm.py Fixed infinite loop on truncated file 2015-08-29 02:05:08 +10:00
test_file_psd.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_sgi.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_spider.py Added tests 2016-04-04 18:48:21 +10:00
test_file_sun.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_tar.py Replace lena.tar with hopper.tar 2014-09-04 12:21:19 +03:00
test_file_tga.py Test TGA RLE file 2016-04-21 17:49:35 +03:00
test_file_tiff_metadata.py Tests for issue #1462, #1834, #1831, #1910 2016-06-26 12:05:05 +01:00
test_file_tiff.py API change/revert: Bytes should be returned as a single byte string, not a tuple of integers 2016-06-26 12:06:56 +01:00
test_file_webp_alpha.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_file_webp_lossless.py Specified exception types 2015-05-30 09:18:27 +10:00
test_file_webp_metadata.py Specified exception types 2015-05-30 09:18:27 +10:00
test_file_webp.py Added various tests 2015-07-03 15:03:25 +10:00
test_file_xbm.py Fix comment and file 2015-05-12 13:34:18 +03:00
test_file_xpm.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_font_bdf.py Added various tests 2015-07-03 15:03:25 +10:00
test_font_pcf.py Added various tests 2015-07-03 15:03:25 +10:00
test_format_hsv.py Added missing future print imports and removed unnecessary imports 2015-05-23 20:28:41 +10:00
test_format_lab.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_image_array.py [Test] image array add LA mode test 2016-04-29 21:03:24 +01:00
test_image_convert.py improve test: compare all pixels, do not take color into account 2016-06-30 16:59:04 +03:00
test_image_copy.py Added __copy__ method to Image 2016-03-16 20:23:51 +11:00
test_image_crop.py Failing test for #1744 2016-02-24 15:06:28 +02:00
test_image_draft.py Fix typo: fihopperme -> filename 2014-09-15 08:59:28 +03:00
test_image_filter.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_image_frombytes.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_fromqimage.py Flake8 fixes 2015-12-10 21:34:02 +11:00
test_image_fromqpixmap.py Removed unused imports 2015-06-19 15:35:56 +10:00
test_image_getbands.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_image_getbbox.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_getcolors.py Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() 2014-09-14 20:00:13 +03:00
test_image_getdata.py Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() 2014-09-14 20:00:13 +03:00
test_image_getextrema.py Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() 2014-09-14 20:00:13 +03:00
test_image_getim.py Health fixes 2016-04-01 21:49:30 +11:00
test_image_getpalette.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_getpixel.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_image_getprojection.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_histogram.py Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() 2014-09-14 20:00:13 +03:00
test_image_load.py Removed unnecessary lambdas 2015-04-24 16:02:39 +10:00
test_image_mode.py Added various tests 2015-07-03 15:03:25 +10:00
test_image_point.py Removed comment 2015-11-11 23:42:19 +11:00
test_image_putalpha.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_image_putdata.py Various Flake8 fixes 2015-04-24 09:26:52 +10:00
test_image_putpalette.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_putpixel.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_quantize.py Add perceptive comparisons to quantization tests 2016-05-26 17:23:43 +02:00
test_image_resample.py Do not make unnecessary passes on resizing 2016-06-15 01:04:02 +03:00
test_image_resize.py Fixed various typos 2015-05-29 14:59:54 +10:00
test_image_rotate.py Only use fast rotate operations if the expand flag is in use or the image is square 2015-08-06 00:23:14 +10:00
test_image_split.py Further health fixes 2015-04-24 18:24:52 +10:00
test_image_thumbnail.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_tobitmap.py Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
test_image_tobytes.py Changed assertTrue isinstance to assertIsInstance 2015-12-08 20:31:02 +11:00
test_image_toqimage.py Changed assertTrue isinstance to assertIsInstance 2015-12-08 20:31:02 +11:00
test_image_toqpixmap.py Changed assertTrue isinstance to assertIsInstance 2015-12-08 20:31:02 +11:00
test_image_transform.py Changed variable name foo since it has been blacklisted in health 2015-04-01 10:29:26 +11:00
test_image_transpose.py Further health fixes 2015-04-24 18:24:52 +10:00
test_image.py Fixed bug when saving to a non-existent path using pathlib 2016-02-27 13:10:50 +11:00
test_imagechops.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_imagecms.py Fix 2 more failing tests on 32 bit due to float precision 2016-06-30 06:38:31 -07:00
test_imagecolor.py Various Flake8 fixes 2015-07-03 16:22:56 +10:00
test_imagedraw.py Added test 2016-06-09 22:28:29 +01:00
test_imageenhance.py Various Flake8 fixes 2015-04-24 09:26:52 +10:00
test_imagefile.py test for this 2015-09-15 20:12:16 +03:00
test_imagefont_bitmap.py Flake8 fixes 2015-12-31 07:27:27 +11:00
test_imagefont.py Allowed textsize method to pass on multiline_textsize method specific arguments 2016-01-06 17:13:16 +11:00
test_imagegrab.py Added support for ImageGrab.grab to OS X 2015-08-01 17:44:13 +10:00
test_imagemath.py Added missing future print imports and removed unnecessary imports 2015-05-23 20:28:41 +10:00
test_imagemorph.py Check that images are L mode in ImageMorph methods 2015-08-28 22:54:17 +10:00
test_imageops_usm.py Fixed redefined built-in 2015-12-10 21:34:02 +11:00
test_imageops.py Replaced old-style classes 2015-05-27 00:07:21 +10:00
test_imagepalette.py Removed ImagePalette methods, deprecated in 2.6 2015-09-19 21:06:12 +10:00
test_imagepath.py Replaced mixed tabs and spaces with spaces 2016-05-10 22:23:23 +10:00
test_imageqt.py Updated documentation URL 2015-06-19 18:28:13 +10:00
test_imagesequence.py Merge pull request #1686 from radarhere/seek 2016-01-31 09:08:09 -08:00
test_imageshow.py Removed unnecessary pass lines and commented debugging lines 2015-04-24 16:02:38 +10:00
test_imagestat.py Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() 2014-09-14 20:00:13 +03:00
test_imagetk.py Added test for ImageTk _get_image_from_kw 2016-05-01 22:19:52 +10:00
test_imagewin_pointers.py Version check rather than try/except 2016-01-03 13:04:04 -08:00
test_imagewin.py Removed undefined variable 2015-12-02 16:09:47 +11:00
test_lib_image.py Use unique class names to match filenames 2014-07-20 01:17:20 +03:00
test_lib_pack.py Enable basic support for 'RGBa' raw encoding/decoding 2015-02-02 13:06:56 +03:00
test_locale.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_mode_i16.py Further health fixes 2015-04-24 18:24:52 +10:00
test_numpy.py These modes upconvert to 32bit I 2016-06-25 14:33:26 +01:00
test_olefileio.py Fixed redefined built-in 2015-12-10 21:34:02 +11:00
test_pickle.py Fixed redefined built-in 2015-12-10 21:34:02 +11:00
test_psdraw.py Update RTD links https://blog.readthedocs.com/securing-subdomains/ 2016-04-28 09:35:03 +03:00
test_pyroma.py Forcing this one to pass 2016-01-01 15:57:42 +00:00
test_scipy.py Clarified comment 2015-12-25 12:02:18 +11:00
test_shell_injection.py Merge branch 'master' into flake8 2014-09-14 10:23:51 +03:00
test_tiff_ifdrational.py Skip tests that require libtiff if it is not installed, fixes #1866 2016-05-06 09:07:00 -07:00
test_util.py Remove unused tearDownModule 2014-07-08 07:59:17 +03:00
threaded_save.py Added missing future print imports and removed unnecessary imports 2015-05-23 20:28:41 +10:00
versions.py Added missing future print imports and removed unnecessary imports 2015-05-23 20:28:41 +10:00

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 coverage nose

If you're using Python 2.6, there's one additional dependency::
  
    pip install unittest2

Execution
---------

**If Pillow has been built in-place**

To run an individual test::

    python Tests/test_image.py

Run all the tests from the root of the Pillow source distribution::

    nosetests -vx Tests/test_*.py

Or with coverage::

    coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py
    coverage report
    coverage html
    open htmlcov/index.html

**If Pillow has been installed**

To run an individual test::

    ./test-installed.py Tests/test_image.py

Run all the tests from the root of the Pillow source distribution::

    ./test-installed.py