Commit Graph

162 Commits

Author SHA1 Message Date
Andrew Murray
18e204df05 Removed DPI rounding from JPEG loading 2021-05-07 21:23:29 +10:00
Andrew Murray
6967f3519f Test when "adobe_transform" is unable to be read 2021-04-20 20:53:50 +10:00
Andrew Murray
4351c37fc4 Corrected adobe_transform value 2021-04-15 21:49:51 +10:00
Eric Soroos
1c872a9eda lint stuff 2021-04-10 16:58:01 +02:00
Eric Soroos
a3a69c8385 conditional mark for valgrind ignore 2021-04-09 23:53:24 +02:00
Andrew Murray
2c8684c525 Moved getxmp() into JpegImageFile 2021-04-01 22:28:37 +11:00
Andrew Murray
c52b45df62 Removed automatic retrieval of GPS IFD 2021-03-15 12:33:06 +11:00
Andrew Murray
3495b319bd Replaced various instances of assert_image_similar with assert_image_similar_tofile 2021-02-21 22:22:29 +11:00
Andrew Murray
a5c251029c Replaced various instances of assert_image_equal with assert_image_equal_tofile 2021-02-21 22:15:56 +11:00
Hugo van Kemenade
1857bf5570
Merge pull request #5259 from radarhere/warns 2021-02-17 21:31:15 +02:00
Andrew Murray
83542c42bf Added context managers 2021-02-11 21:43:54 +11:00
Andrew Murray
4a0569e97f Changed zero length assertions to falsy 2021-02-11 13:48:31 +11:00
Eric Soroos
1d7c8e03d0 known failing tests from valgrind -- uninitialized values 2021-01-07 14:52:02 +01:00
gofr
d54dc4062f fixup! Add tests for loading/saving of 16-bit quantization tables 2020-10-10 20:01:28 +02:00
gofr
2f0544b542 Add tests for loading/saving of 16-bit quantization tables 2020-10-10 18:53:49 +02:00
Hugo van Kemenade
9f1f63a46b
Merge pull request #4862 from radarhere/subifds 2020-09-02 16:58:55 +03:00
Andrew Murray
186a4723c8 Added test for empty GPS IFD 2020-09-02 21:14:36 +10:00
Andrew Murray
298b7d0333 Update pre-commit 2020-08-31 18:50:15 +10:00
luphord
4bb35c57dd clarify comment
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-08-28 20:47:17 +10:00
luphord
ae5e0218e9 remove whitespace 2020-08-28 20:47:17 +10:00
luphord
1fd9ccfe3c test Exif self-equality 2020-08-28 20:47:16 +10:00
Andrew Murray
e96109b93c Added writing of subIFDs 2020-08-13 22:25:24 +10:00
Hugo van Kemenade
dd87dd50c0 Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
Kirill Kuzminykh
6d2fe429c2 Reformat code of `test_file_jpeg.py. 2020-06-22 12:20:57 +03:00
Andrew Murray
95ace8a39c
Merge branch 'master' into fix_jpeg_magic_number 2020-06-22 18:42:58 +10:00
nulano
a324f4a466 add version to features info block 2020-06-21 18:58:39 +10:00
Hugo van Kemenade
bcb8cbbf22
Merge pull request #4639 from radarhere/jfif
Write JFIF header when saving JPEG
2020-06-20 15:54:11 +03:00
Andrew Murray
65742cfc95 Renamed test 2020-06-20 09:57:51 +10:00
Andrew Murray
abbc890b20 Replaced OSError with more specific UnidentifiedImageError 2020-06-20 09:51:48 +10:00
Andrew Murray
3e9068a345 Decreased length of test image data 2020-06-20 09:48:55 +10:00
Kirill Kuzminykh
f99e0b824b Replaced primitive "magic number" inside of JpegImagePlugin._accept() function by more correct version. 2020-06-18 16:18:18 +03:00
Andrew Murray
ccac9e1a3a Changed to ImageFileDirectory_v2 2020-06-03 22:11:51 +10:00
Andrew Murray
696aa7972d Parametrized test 2020-05-26 07:15:20 +10:00
Andrew Murray
660894cd36 Write JFIF header when saving JPEG 2020-05-24 23:58:30 +10:00
Andrew Murray
df886ed386
Merge pull request #4290 from bluepython508/fix_djpeg_load_test
Fixes djpeg load test
2020-05-16 19:53:18 +10:00
Alexander
f15e4a8e06 truncate icclist instead of changing to None 2020-05-08 19:48:20 +03:00
Hugo
dda6145fce Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
Andrew Murray
e41cfade29 Add JPEG comment to info dictionary 2020-03-07 06:57:29 +11:00
Hugo
2cc6a9a974 Convert to use pytest 2020-03-02 16:31:08 +02:00
Hugo van Kemenade
3c995fd173
Merge pull request #4440 from radarhere/jpeg_quality
Allow saving of zero quality JPEG images
2020-02-25 12:02:53 +02:00
Hugo
699a9dadf1 Convert asserts 2020-02-22 18:07:04 +02:00
Andrew Murray
8482919a37 Converted most assert statements to pytest 2020-02-23 00:06:21 +11:00
Andrew Murray
a8c0794107 Allow saving of zero quality JPEG images 2020-02-21 22:05:44 +11:00
Jon Dufresne
4f185329f4 Streamline test skipping based on supported features
This adds a new test decorator: skip_unless_feature(). The argument is
the same as passed to features.check(). If the feature is not supported,
the test will be skipped.

This removes several kinds of boilerplate copied and pasted around tests
so test feature checking is handled and displayed more consistently.

Refs #4193
2020-02-18 13:07:01 -08:00
Jon Dufresne
98a2081a78 Move safe imports to the top of test files
These modules are safe to import and this better follows PEP 8.

From https://www.python.org/dev/peps/pep-0008/#imports

> Imports are always put at the top of the file, just after any module
> comments and docstrings, and before module globals and constants.
2020-02-17 10:49:27 -08:00
ben
a4721d374f Fixes djpeg load test
* Test fails with `libjpeg-turbo` and `libjpeg-progs` on Ubuntu 16.04
* Epsilon reported is 4.18...
2020-02-15 13:59:53 +11:00
Hugo van Kemenade
098406c304
Merge pull request #4390 from jdufresne/resource-warning
Fix ResourceWarning emitted during tests
2020-02-12 17:10:51 +02:00
Hugo
38bf862185 Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
Hugo
a4bf9fa036 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
Jon Dufresne
2b84221edf Fix ResourceWarning emitted during tests
Appeared in the form:

    ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/invalid-exif-without-x-resolution.jpg'>

Enable all warnings to always display during tests to help catch these
warnings earlier.
2020-01-26 16:00:46 -08:00