Commit Graph

110 Commits

Author SHA1 Message Date
Hugo
3ff70c2afc
Merge branch 'master' into imagecms-deprecations 2019-02-13 15:45:28 +02:00
Jon Dufresne
4de5477b61 Remove unnecessary unittest.main() boilerplate from test files
With the introduction and use of pytest, it is simple and easy to
execute specific tests in isolation through documented command line
arguments. Either by specifying the module path or through the `-k
EXPRESSION` argument. There is no longer any need to provide the
boilerplate:

    if __name__ == '__main__':
        unittest.main()

To every test file. It is simply noise.

The pattern remains in test files that aren't named with `test_*` as
those files are not discovered and executed by pytest by default.
2019-02-03 10:10:16 -08:00
Hugo
a2a5ebfeb4 Refactor 2019-01-28 15:40:19 +02:00
Hugo
a9070f3ca2 Group deprecation tests 2019-01-28 15:40:19 +02:00
Hugo
3476474359 Add warnings to deprecated CMS profile attributes 2019-01-28 15:40:19 +02:00
Hugo
e1381d2102 Add warnings to deprecated CMS profile attributes 2019-01-28 15:40:19 +02:00
Hugo
a149c13d2e Add warnings to deprecated CMS profile attributes 2019-01-28 15:40:19 +02:00
Hugo
7d157bd825 Add warnings to deprecated CMS profile attributes 2019-01-28 15:40:19 +02:00
Hugo
e7eac4f80b Add warnings to deprecated CMS profile attributes 2019-01-28 15:40:19 +02:00
Jon Dufresne
7da17ad41e Improve pytest configuration to allow specific tests as CLI args
The previous test configuration made it difficult to run a single test
with the pytest CLI. There were two major issues:

- The Tests directory was not a package. It now includes a __init__.py
  file and imports from other tests modules are done with relative
  imports.

- setup.cfg always specified the Tests directory. So even if a specific
  test were specified as a CLI arg, this configuration would also always
  include all tests. This configuration has been removed to allow
  specifying a single test on the command line.

Contributors can now run specific tests with a single command such as:

  $ tox -e py37 -- Tests/test_file_pdf.py::TestFilePdf.test_rgb

This makes it easy and faster to iterate on a single test failure and is
very familiar to those that have previously used tox and pytest.

When running tox or pytest with no arguments, they still discover and
runs all tests in the Tests directory.
2019-01-13 09:00:12 -08:00
Hugo
ceebfc6fe8 flake8: E501 line too long 2018-11-11 19:01:11 +02:00
Hugo
94c94eb1f7 flake8: E128 continuation line under-indented for visual indent 2018-11-11 19:01:11 +02:00
Hugo
717add44b0 flake8: E201 whitespace after '(' 2018-11-11 19:01:11 +02:00
Hugo
eb9aee7048 flake8: F841 local variable is assigned to but never used 2018-11-11 19:01:10 +02:00
Andrew Murray
9b0d4baa8c Continuation line under-indented for visual indent 2018-09-27 20:31:01 +10:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Andrew Murray
145589ef14 Ambiguous variable name 'l' 2018-07-02 19:21:44 +10:00
Hugo
ecc4c7fecc Remove unittest regex deprecation warnings 2018-04-14 21:54:40 +03:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
Andrew Murray
9e843a2d9b Changed format of lambda calls 2017-09-01 21:05:40 +10:00
Andrew Murray
371933a597 Added tests 2017-09-01 20:36:51 +10:00
Alexander
349e300d7b use getchannel where is possible 2017-08-09 02:36:07 +03:00
Andrew Murray
e8cba27bb1 Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
Andrew Murray
37b293f593 Flake8 fixes 2017-04-20 21:14:23 +10:00
Andrew Murray
18fea70b51 Removed unused variable 2017-03-03 21:38:19 +11:00
Jarkko Pöyry
fa56b3d255 Add tests for CMS transform auxiliary channel preservation. See bug #1662. 2017-01-28 22:04:49 +02:00
Alexander
ba92896a53 remove old version 2016-12-07 04:39:36 +03:00
wiredfool
9440764863 Merge pull request #2131 from wiredfool/imagecms-segfault
Fix for ImageCms Segfault
2016-10-03 06:02:39 -07:00
Tim Graham
0c66b80a95 Fix "invalid escape sequence" warning in Python 3.6
http://bugs.python.org/issue27364
2016-09-27 19:26:57 -04:00
wiredfool
1d068b6e0a Check type of items passed into to ImageCms.ImageCmsProfile, fixes #2037 2016-09-26 14:56:00 -07:00
Andrew Murray
72d5218080 Flake8 fixes 2016-09-03 12:17:22 +10:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
wiredfool
c057c4238e Fix 2 more failing tests on 32 bit due to float precision 2016-06-30 06:38:31 -07:00
AbdealiJK
356926f825 test_imagecms: Reduce precision of extended info
In 32bit computers (when making wheels) it was found that the
precision of the extended information in test_extended_information() was
found to be lesser than what was being tested. This commit adds a helper
function which reduces the precision by truncating (multiplying by
10 ** digits, truncating to int and dividing by 10 ** digits) and then
testing the rtruncated numbers rather than the original numbers.
2016-06-28 21:14:34 +05:30
wiredfool
3926bfb747 Skip test when icc profile is not available, fixes #1887 2016-05-06 08:58:40 -07:00
Marcus Brinkmann
87603266ad Give much more details about ICC profiles. 2016-03-05 04:40:24 +01:00
Andrew Murray
d1c182cadc Various Flake8 fixes 2015-04-24 09:26:52 +10:00
Andrew Murray
192fa39fb7 Fixed duplicate import in test_imagecms 2015-04-01 09:56:12 +11:00
wiredfool
460160a1e3 Updated merge from master 2014-09-26 16:07:52 -07:00
wiredfool
af138af779 Use lcms profile where possible, otherwise skip test if sRGB profile is not available 2014-09-24 21:48:56 -07:00
Hugo
781da7d465 Replace lena.Lab.tif with hopper.Lab.tif + flake8 2014-09-23 13:45:32 +03:00
hugovk
a2e729f487 Replace some lena with hopper 2014-09-14 22:58:23 +03:00
wiredfool
5966278643 Added im.info['icc_profile'] to results for ImageCms.applyTransform 2014-07-29 21:20:11 -07:00
wiredfool
13eb3d667a Added profile.tobytes() for ImageCms Profiles 2014-07-29 20:44:17 -07:00
hugovk
cf04a9a0d2 Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
wiredfool
0b0ec8b40f Proper skipping of tests when lcms2 is not installed 2014-06-19 06:06:23 -07:00
hugovk
3ec505958e Convert old tests to use unittest 2014-06-10 12:10:47 +03:00
hugovk
6115d348b9 Add more tests for ImageCms 2014-06-02 13:19:01 +03:00
hugovk
9e984a19b1 Add more tests for ImageCms 2014-06-02 13:00:21 +03:00
hugovk
e983057294 pep8/pyflakes 2014-06-02 12:41:48 +03:00
wiredfool
ab3687e10f Tests correctly check for the core object 2014-04-03 16:04:29 -07:00
wiredfool
deb424c5cd working tests for LAB color conversions using ImagingCMS 2013-10-15 22:06:30 -07:00
wiredfool
215b61aadf added lab->srgb and srgb->lab->srgb tests 2013-10-11 23:39:16 -07:00
wiredfool
ace78d0734 Lab is Uint, Int, Int. Tests failing 2013-10-11 23:31:47 -07:00
wiredfool
1c3932e89f Added LAB mode, core dumped 2013-10-10 23:27:34 -07:00
wiredfool
ac38d91a2d Well, now I know _why_ it's failing. We don't have a concept for LAB color 2013-10-10 23:02:33 -07:00
wiredfool
b506e2ad44 Fixed ability to create LAB profiles with color temperatures 2013-10-10 22:42:27 -07:00
wiredfool
9042f8c61f split tests, disable info difference tests 2013-10-10 22:16:56 -07:00
wiredfool
13860addc4 versioning 2013-10-01 23:22:45 -07: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