Commit Graph

23 Commits

Author SHA1 Message Date
Hugo
5631718a8d Format with Black 2019-06-13 18:54:46 +03:00
Andrew Murray
e9c0cf61f3 Fixed palette for LA and PA mode when pickling 2019-05-11 14:43:00 +10:00
Hugo
65c55402b9
Merge pull request #3537 from radarhere/pickle
Fixed pickling of iTXt class with protocol > 1
2019-02-20 11:50:30 +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
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
hugovk
9dbaf92f3e itxt_chunks.png fails with protocol v2 2019-01-03 09:31:55 +11:00
hugovk
1b338998dc Test a png file with iTXt chunks 2019-01-03 09:31:55 +11:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
Andrew Murray
1c99b39239 Fixed redefined built-in 2015-12-10 21:34:02 +11:00
Andrew Murray
ee34d6843b Further health fixes 2015-04-24 18:24:52 +10:00
hugovk
7823197fdd Failing tests to pickle L mode images 2015-01-30 14:00:46 +02:00
hugovk
bdf845d6df Fix typo: fihopperme -> filename 2014-09-15 08:59:28 +03:00
hugovk
8dad2b0c63 Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures 2014-09-05 13:03:56 +03:00
hugovk
cf04a9a0d2 Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
hugovk
78003ca473 Update paths to Tests/images/ instead of Images/ 2014-06-23 09:19:29 +03:00
hugovk
3ec505958e Convert old tests to use unittest 2014-06-10 12:10:47 +03:00
hugovk
a7d21dec15 Remove temp test code 2014-04-26 20:41:01 +03:00
hugovk
7d1cdc54c4 Don't skip all the tests on Python 3 when there's no cPickle, just the irrelevant test 2014-04-26 20:20:42 +03:00
hugovk
8794c46318 For pickling, test with Image's __eq__. Everything else can use the old assert_image_equal. 2014-04-26 20:05:02 +03:00
hugovk
2a6f2c5442 Add __eq__ and __ne__ to Image to be able to test image equality when pickling. Pickle more data. 2014-04-26 19:43:53 +03:00
hugovk
e4185694a2 P3 will skip explicit cPickle tests 2014-04-22 09:30:15 +03:00
hugovk
adfbe8323a Tests and partial implementation of pickling (#629) 2014-04-22 08:54:16 +03:00