Pillow/Tests
artscoop 514c55aa16 Test fix for supported 32bit RGBA .cur file
Some .cur file with alpha was loaded fully opaque with PIL. Fixed, and fixed the test to take that into account.
2015-03-05 10:55:32 +01:00
..
fonts Testcase added. 2015-01-07 21:38:35 -08:00
icc Licensed, freely available icc profiles 2014-09-24 21:47:32 -07:00
images Fix for zlib.decompression bomb in iTXt,zTXt, and iCCP chunks 2014-12-28 22:49:52 -08:00
32bit_segfault_check.py flake8 2014-08-28 14:44:19 +03:00
bench_cffi_access.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
bench_get.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
check_icns_dos.py flake8 2014-08-28 14:44:19 +03:00
check_j2k_dos.py flake8 2014-08-28 14:44:19 +03:00
check_j2k_leaks.py Don't run memory leak test automatically. 2014-09-12 22:45:02 -07:00
check_jpeg_leaks.py Tests for jpeg memory leaks 2014-09-24 15:45:41 -07:00
check_png_dos.py Test style cleanup 2014-12-30 16:57:24 -08:00
check_webp_leaks.py webp: add memory leak test 2015-02-23 11:10:37 +01:00
crash_ttf_memory_error.py flake8 2014-08-28 14:44:19 +03:00
helper.py Fix some Landscape.io errors and warnings 2014-10-01 16:50:33 +03:00
import_all.py flake8 2014-08-28 17:18:54 +03:00
large_memory_numpy_test.py Do not quit Python if numpy is not installed 2014-12-19 00:40:27 -08:00
large_memory_test.py flake8 2014-08-28 14:44:19 +03:00
make_hash.py Storage, packing and access for HSV format images 2014-07-22 16:09:22 -07:00
README.rst Fixed typo in Tests README.rst 2015-03-02 09:28:24 +11:00
show_icc.py py3k: Import Christoph Gohlke's test suite 2013-01-10 08:46:39 -06:00
show_mcidas.py flake8 2014-08-26 16:47:10 +03:00
test_000_sanity.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_binary.py Fixed binary conversion bug, and added corresponding tests 2015-03-02 09:56:47 +11:00
test_bmp_reference.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_box_blur.py Some landscape.io fixes 2014-11-27 21:43:45 +02:00
test_cffi.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_decompression_bomb.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_bmp.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_cur.py Test fix for supported 32bit RGBA .cur file 2015-03-05 10:55:32 +01:00
test_file_dcx.py Replace lena.dcx with hopper.dcx. Created with ImageMagick: convert hopper.ppm hopper.dcx 2014-09-04 13:24:53 +03:00
test_file_eps.py Fix some Landscape.io errors and warnings 2014-10-01 16:50:33 +03:00
test_file_fli.py Replace lena.fli with hopper.fli 2014-09-29 10:40:33 -07:00
test_file_gif.py rename Image.ANTIALIAS to Image.LANCZOS 2014-11-28 01:41:56 +03:00
test_file_gimpgradient.py Relax exact equals to approximate 2014-09-29 16:36:09 -07:00
test_file_icns.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_file_ico.py rename Image.ANTIALIAS to Image.LANCZOS 2014-11-28 01:41:56 +03:00
test_file_iptc.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_jpeg.py Adjust buffer size when quality=keep, fixes #148 (again) 2015-01-18 10:56:29 -08:00
test_file_jpeg2k.py Need 'temp_' or 'temp.' in filename 2014-08-20 00:36:29 +03:00
test_file_libtiff_small.py Replace lena_g4.tif with hopper_g4.tif 2014-09-23 10:30:55 +03:00
test_file_libtiff.py Remove unused variable, and other minor flake8 warnings 2014-11-17 10:33:31 +02:00
test_file_mpo.py flake8 2014-08-28 14:44:19 +03:00
test_file_msp.py Don't use builtin as variable 2014-11-01 09:55:15 +02:00
test_file_palm.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_file_pcx.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_pdf.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_png.py Correct the name 2015-01-28 10:02:04 -08:00
test_file_ppm.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_psd.py Replace lena.psd with hopper.psd 2014-09-23 13:53:51 +03:00
test_file_sgi.py Replace lena.rgb and lena.bw with hopper 2014-09-04 10:31:16 +03:00
test_file_spider.py Replace lena.spider with hopper.spider, created with Pillow. 2014-09-04 12:28:37 +03:00
test_file_sun.py Replace lena.ras with hopper.ras, created with ImageMagick: convert hopper.jpg hopper.ras 2014-09-04 12:59:03 +03:00
test_file_tar.py Replace lena.tar with hopper.tar 2014-09-04 12:21:19 +03:00
test_file_tga.py rename test 2014-08-20 10:39:11 +04:00
test_file_tiff_metadata.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_file_tiff.py Test as_dict() directly instead of as string. Fix for PyPy. 2015-02-08 19:09:39 +02:00
test_file_webp_alpha.py early versions of webp are known to produce higher deviations: deal with it 2015-02-14 23:50:25 +11:00
test_file_webp_lossless.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_file_webp_metadata.py Skip webp mux with the right skip message 2014-10-11 09:42:10 -07:00
test_file_webp.py Fix some Landscape.io errors and warnings 2014-10-01 16:50:33 +03:00
test_file_xbm.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_file_xpm.py Replace lena.xpm with hopper.xpm 2014-09-23 16:01:58 +03:00
test_font_bdf.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_font_pcf.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_format_hsv.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_format_lab.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_image_array.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_convert.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_copy.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_image_crop.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_draft.py Fix typo: fihopperme -> filename 2014-09-15 08:59:28 +03:00
test_image_filter.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_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_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 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_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 Replace lena.gif with hopper.gif 2014-09-04 08:44:46 +03:00
test_image_mode.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_offset.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_point.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
test_image_putalpha.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_image_putdata.py Test for issue #1008 2014-11-13 15:33:37 -08: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 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_resize.py rename Image.ANTIALIAS to Image.LANCZOS 2014-11-28 01:41:56 +03:00
test_image_rotate.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_split.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_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 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_transform.py fix tests: use im.transform directly when result is compared 2014-11-10 02:11:12 +03:00
test_image_transpose.py use not square image for test, fix tests 2014-11-07 13:15:51 +03:00
test_image.py Update epsilona for hopper 2014-09-04 09:40:14 +03:00
test_imagechops.py Change some lena() to hopper() 2014-09-05 12:36:24 +03:00
test_imagecms.py Updated merge from master 2014-09-26 16:07:52 -07:00
test_imagecolor.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_imagedraw.py Slightly relax imagedraw tests to pass on x86 2014-09-30 08:33:29 -07:00
test_imageenhance.py Test for alpha preservation in ImageEnhance, #899 2014-09-18 09:10:08 -07:00
test_imagefile.py Test failure explanation on PPC 2014-09-29 22:28:11 -07:00
test_imagefileio.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_imagefont_bitmap.py Fix bitmap tests to account for different metrics for bitmap and ttf fonts on some platforms 2015-01-07 21:38:36 -08:00
test_imagefont.py Restrict tests to linux/osx 2014-12-31 19:59:50 -08:00
test_imagegrab.py Yet another Python 3 fix 2014-09-16 17:41:03 +03:00
test_imagemath.py Merge pull request #773 from hugovk/ImageMath 2014-07-10 10:14:20 -07:00
test_imagemorph.py Fix some Landscape.io errors and warnings 2014-10-01 16:50:33 +03:00
test_imageops_usm.py sharp alpha channel 2014-11-22 01:58:31 +03:00
test_imageops.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_imagepalette.py More ImagePalette.py tests and remove unused and uncallable new() 2014-07-21 23:18:46 +03:00
test_imagepath.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_imageqt.py [ADD] added PySide compability changes to Tests/test_imageqt.py 2014-11-22 09:52:23 +01:00
test_imagesequence.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_imageshow.py Remove unused tearDownModule 2014-07-07 20:03:50 +03: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 Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_imagewin.py Merge from master 2014-09-23 09:52:03 -07: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 s/lena/hopper/ 2014-09-23 09:52:34 -07:00
test_numpy.py Test for issue #1008 2014-11-13 15:33:37 -08:00
test_olefileio.py Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
test_pickle.py Failing tests to pickle L mode images 2015-01-30 14:00:46 +02:00
test_psdraw.py Test drawing diagonal lines 2014-12-27 22:50:17 +02:00
test_pyroma.py Relax pyroma for RC versions 2014-09-29 13:14:49 -07:00
test_scipy.py Fixed array parameters to reflect new image resizing behavior 2014-12-31 17:17:42 -08:00
test_shell_injection.py Merge branch 'master' into flake8 2014-09-14 10:23:51 +03:00
test_util.py Remove unused tearDownModule 2014-07-08 07:59:17 +03:00
threaded_save.py Merge remote-tracking branch 'upstream/master' into flake8 2014-09-23 16:35:20 +03:00
versions.py flake8 2014-08-28 14:44:19 +03: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