Commit Graph

1872 Commits

Author SHA1 Message Date
wiredfool
44d97759af Merge pull request #209 from wiredfool/pr202
Fonts from Filelike Objects
2013-04-25 22:14:10 -07:00
wiredfool
2e3cc80aa5 Added font rendering tests 2013-04-25 21:58:04 -07:00
Nicolas Pieuchot
5577801aaa Changing StringIO to BytesIO 2013-04-25 21:45:12 +02:00
Nicolas Pieuchot
6d8ba56c44 Adding Python 3 support for StringIO 2013-04-25 21:25:06 +02:00
Nicolas Pieuchot
450a068ccb Removing buffer from imagefont 2013-04-25 18:48:43 +02:00
Michał Górny
0aa05780c5 test_file_tiff: skip JPEG-in-TIFF tests if libjpeg is not available. 2013-04-22 11:55:17 +02:00
wiredfool
c3d6b0d7f6 Merge pull request #201 from wiredfool/pr199
Skip tests for features that aren't compiled in, includes #199
2013-04-21 13:43:14 -07:00
wiredfool
52cbacf028 renamed 2013-04-21 13:54:30 -07:00
wiredfool
25f26f74e8 rename to include libtiff 2013-04-21 13:53:43 -07:00
wiredfool
d2c9ee14ad skipp these test is libtiff support is not included 2013-04-21 13:52:04 -07:00
wiredfool
945b6bf53c Split tiff tests so that test_file_tiff tests the builtins, and test_file_libtiff tests only things that depend on libtiff 2013-04-21 13:51:16 -07:00
Michał Górny
c01696bf2d Use proper tempdir for temporary test files.
Writing temporary files in source tree is just wrong. Instead, use
a directory inside system tempdir.
2013-04-21 11:05:31 +02:00
Michał Górny
995fe2b041 test_file_tiff: skip if TIFF is not available. 2013-04-21 10:40:56 +02:00
Michał Górny
a83530f475 test_font_pcf: skip if zlib is not available. 2013-04-21 10:30:59 +02:00
Michał Górny
a5a5c854b8 test_image_draft: skip if no JPEG support. 2013-04-21 10:27:27 +02:00
Michał Górny
e2221de8f5 Support (most of) test_image_split without PNG.
If PNG (zlib) support is disabled, use .pcx for test_image_split which
is unconditional. Since it does not support RGBA, skip the RGBA test.
Otherwise, just use PNG and do the full test.
2013-04-21 10:18:32 +02:00
Michał Górny
6cdc8b08db test_imagefile: handle missing PNG & JPEG encoders gracefully. 2013-04-21 10:13:33 +02:00
Michał Górny
6afa11ec02 test_file_tar: skip if codecs are not available.
The .tar test requires both jpeg & zlib support. If one of the two is
unavailable, run the test for the second one. If both are unavailable,
skip the test.
2013-04-21 10:04:58 +02:00
wiredfool
b0fffd24a4 Merge branch 'master' of https://github.com/python-imaging/Pillow into namespaced 2013-04-09 12:08:13 -07:00
wiredfool
8295e33390 moved _webp into the PIL namespace 2013-04-08 21:53:59 -07:00
Alex Clark ☺
8e3072230f Merge pull request #178 from manisandro/endian
Fix tests which are hardcoded for little-endian CPUs
2013-04-08 17:54:26 -07:00
Sandro Mani
2a2a1ea144 Fix tests which are hardcoded for little-endian CPUs 2013-04-07 19:02:11 +02:00
wiredfool
38b0bef464 webp is in import, not a codec 2013-03-27 10:00:35 -07:00
wiredfool
86bb25e735 reenable basic webp test, skip if support not installed 2013-03-27 09:52:47 -07:00
David Schmidt
a05bf23b05 Merge branch 'master' of https://github.com/python-imaging/Pillow 2013-03-26 11:24:52 +01:00
David Schmidt
5303f0ea66 added tests to cover save of four different png transparencies 2013-03-26 11:24:07 +01:00
Alex Clark ☺
8244203366 Merge pull request #157 from wiredfool/webp_tests
approximate test for lossy image writing
2013-03-23 08:46:24 -07:00
wiredfool
2a743c9527 JpegImagePlugin sets bufsize for optimized images 2013-03-22 22:27:12 -07:00
wiredfool
5eae020aef py3 as well 2013-03-22 21:25:37 -07:00
wiredfool
f432530df3 approximate test for lossy image writing 2013-03-22 21:15:45 -07:00
Sandro Mani
e3cb3074ce Add tempfile for test output 2013-03-22 01:58:19 +01:00
wiredfool
d678b97444 added write verification test 2013-03-19 13:49:01 -07:00
wiredfool
02931c4956 checking results of webp decoding 2013-03-19 13:40:10 -07:00
wiredfool
95353cff15 basic sanity test for webp 2013-03-19 11:43:45 -07:00
Alex Clark
f9a3390bc7 Add test instructions from Mark Sienkiewicz 2013-03-15 16:47:14 -04:00
Alex Clark ☺
d635b516ea Merge pull request #129 from cgohlke/patch-2
Remove test that fails when numpy.int is 64 bit
2013-03-14 17:48:03 -07:00
Alex Clark ☺
1cd3ce8689 Merge pull request #124 from wiredfool/jpeg
Remove irrelevant test
2013-03-14 17:47:24 -07:00
Christoph Gohlke
054f1ef870 Remove test that fails when numpy.int is 64 bit
Fixes issues #75
2013-03-14 17:14:44 -07:00
Christoph Gohlke
5f54802ea7 Enable test_file_tiff 2013-03-14 16:12:57 -07:00
Christoph Gohlke
bd55b8baf1 End 'Make' tag with null byte 2013-03-14 16:06:20 -07:00
wiredfool
c6249a5b76 Remove irrelevant test 2013-03-14 15:45:44 -07:00
wiredfool
d98abd877b merge to master 2013-03-14 14:38:49 -07:00
wiredfool
8b153d1ec4 renamed testfile 2013-03-14 13:33:10 -07:00
Alex Clark
fa275f51b5 Cross plat fix 2013-03-14 16:27:31 -04:00
wiredfool
7d99141405 force seek to beginning of file 2013-03-14 13:25:23 -07:00
Christoph Gohlke
a72d46d314 Disable debug messages during g4 tiff tests 2013-03-14 12:26:00 -07:00
wiredfool
7db24ccac8 StringIO -> BytesIO 2013-03-14 10:17:26 -07:00
Christoph Gohlke
92c3d626c6 Revert PR #110 2013-03-13 23:16:25 -07:00
Christoph Gohlke
e071f062cf Fix g4_tiff test on Python 3 2013-03-13 19:31:37 -07:00
Alex Clark
82ad8dc44b Better skip test ; more changelogging 2013-03-13 21:45:15 -04:00
Alex Clark
062397c0af Skip test 2013-03-13 19:21:43 -04:00
Alex Clark
289d96331a Py3 compat 2013-03-13 18:45:18 -04:00
wiredfool
03dcb5c557 more verbose testing, checking for g4 compression 2013-03-13 10:59:06 -07:00
wiredfool
7226d0dc26 Merge branch 'master' into g4_support 2013-03-12 22:24:36 -07:00
wiredfool
00de0292ac test suite for g4 tiff images 2013-03-11 22:04:22 -07:00
Oliver Tonnhofer
6537ba19c3 backport PIL's PNG/Zip improvements
- add new FASTOCTREE quantizer with alpha support
- make ZIP compress level and type configurable
- support reading/writing PNGs with paletted alpha

source 3637439d51
2013-03-11 20:33:04 +01:00
Alex Clark
d0d92de8ab Punt 2013-03-08 09:32:08 -05:00
Mikhail Korobov
a71183dab5 better fix for #15 (with a test case now) 2013-02-26 17:12:11 +06:00
Mikhail Korobov
c4baeccfce fix 2.6 tests by replacing usages of deprecated fromstring/tostring with frombytes/tobytes 2013-02-26 16:28:34 +06:00
Mikhail Korobov
fbcc9b5c77 Test running improvements: all tests can be run with tox; run.py script exits with an error code in case of failures. 2013-02-26 16:03:25 +06:00
Brian Crowell
848579af9b py3k: Add Windows icon sanity test 2013-01-10 08:47:04 -06:00
Brian Crowell
276cc421f7 py3k: Add XPM read test
This test includes an XPM file with transparency.
2013-01-10 08:47:03 -06:00
Brian Crowell
d6a0dec15b py3k: Add TarIO test
Not too convinced of the size fix. While it works against my file, I'm not
sure someone would have accidentally been an index off and not noticed.
2013-01-10 08:47:03 -06:00
Brian Crowell
6765b8e026 py3k: Add .FLI sanity check, and fix palette bytes bug 2013-01-10 08:47:01 -06:00
Brian Crowell
9921d838e4 py3k: Add Photoshop sanity check 2013-01-10 08:47:01 -06:00
Brian Crowell
2972b2178e py3k: Add PCX to roundtrip test
For some reason, the PCX codec round-trips now.
2013-01-10 08:47:00 -06:00
Brian Crowell
4f7d784a71 py3k: Actually fix the EPS encoder
The EPS encoder wasn't part of Gohlke's test suite, so the previous "fixes"
there were only expected syntactic ones. This gives a cleaner fix to the
encoder.

The decoder doesn't work in round-trip due to a missing eps_decoder method
on the core module, but it's clear it worked at some point.
2013-01-10 08:47:00 -06:00
Brian Crowell
8035b1a76a py3k: FIX: TGA missing o8 declaration
Plus, TGA was eligible for a round-trip test in test_imagefile. It has one
now.
2013-01-10 08:46:59 -06:00
Brian Crowell
a7e3b2e47b py3k: The big push
There are two main issues fixed with this commit:

* bytes vs. str: All file, image, and palette data are now handled as
  bytes. A new _binary module consolidates the hacks needed to do this
  across Python versions. tostring/fromstring methods have been renamed to
  tobytes/frombytes, but the Python 2.6/2.7 versions alias them to the old
  names for compatibility. Users should move to tobytes/frombytes.

  One other potentially-breaking change is that text data in image files
  (such as tags, comments) are now explicitly handled with a specific
  character encoding in mind. This works well with the Unicode str in
  Python 3, but may trip up old code expecting a straight byte-for-byte
  translation to a Python string. This also required a change to Gohlke's
  tags tests (in Tests/test_file_png.py) to expect Unicode strings from
  the code.

* True div vs. floor div: Many division operations used the "/" operator
  to do floor division, which is now the "//" operator in Python 3. These
  were fixed.

As of this commit, on the first pass, I have one failing test (improper
handling of a slice object in a C module, test_imagepath.py) in Python 3,
and three that that I haven't tried running yet (test_imagegl,
test_imagegrab, and test_imageqt). I also haven't tested anything on
Windows. All but the three skipped tests run flawlessly against Pythons
2.6 and 2.7.
2013-01-10 08:46:56 -06:00
Brian Crowell
718dbcc8ca py3k: Provide the missing pngtest_bad.png.base64
This is from http://scary.beasts.org/security/CESA-2004-001.txt. This was
missing from Gohlke's tests. With this file, I see 79 tests and no failures
on my setup from 2.6/2.7.
2013-01-10 08:46:41 -06:00
Brian Crowell
197885164b py3k: Backport Gohlke's tests to run on 2.6/2.7
Most of the differences are in tobytes/tostring naming and expected
behavior of the bytes() constructor. The latter was usually easy to fix
with the right bytes literal.

This is a good preview of what will have to happen in the Python 3 code.
2013-01-10 08:46:39 -06:00
Brian Crowell
ad784eb808 py3k: Import Christoph Gohlke's test suite
This is Christoph Gohlke's test suite from his personal PIL package found
at http://www.lfd.uci.edu/~gohlke/pythonlibs/.

This is just to bring it in as a separate commit. Future commits will align
it with Pillow.
2013-01-10 08:46:39 -06:00