Commit Graph

24 Commits

Author SHA1 Message Date
Hugo
1b99362f3d Merge remote-tracking branch 'upstream/master' into run-black 2019-06-19 09:29:28 +03:00
Hugo
f87821e010 Format with Black 2019-06-13 18:54:11 +03:00
Andrew Murray
f7d7a80b5b Allow ICNS to change size as ICO does 2019-06-12 02:19:58 +10: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
Andrew Murray
b637b5f7a2 Close exclusive fp before discarding 2018-11-13 22:13:55 +11:00
Andrew Murray
e3675f95fb Added tests 2018-09-30 15:08:44 +10:00
Andrew Murray
b0d9b0037b Changed ICNS format tests to pass on OS X 10.11 2018-06-23 15:14:49 +10:00
Andrew Murray
4a781d0013 Replaced MacOS with macOS 2018-03-19 19:38:17 +11:00
Andrew Murray
2123dd70fb Allow append_images to set .icns scaled images 2018-03-19 19:38:07 +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
Jon Dufresne
a33939f5c3 Remove unused, open files at top level of tests.
The data read from the file was unused. The files remained opened and
were never explicitly closed.

Fixes some instances of warnings during tests:

"ResourceWarning: unclosed file ..."
2016-11-01 06:34:17 -07:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
hugovk
30bb31ef59 Fix test according to original: 689f28aae7 (diff-d48d995756d16b9d9b8151e27377a37dR25) 2015-05-05 19:38:10 +03:00
Hugo
e7d85432e4 Fix OS X build
PR https://github.com/python-pillow/Pillow/pull/1209 missed a `file` -> `test_file` change on line 28, which broke the Mac build. Let's also make the constant uppercase whilst we're at it.
2015-05-05 11:15:55 +03:00
Andrew Murray
ee34d6843b Further health fixes 2015-04-24 18:24:52 +10:00
Andrew Murray
d1c182cadc Various Flake8 fixes 2015-04-24 09:26:52 +10:00
Andrew Murray
689f28aae7 Added icns save 2015-04-12 12:58:46 +10: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
Alastair Houghton
5aac5b7eff Made JPEG2K support for files conditional on its inclusion in pillow build. Added a JPEG2K icon test. 2014-03-28 09:09:55 +00:00
Alastair Houghton
5904ac1718 Added some tests and a couple of icns files. 2014-03-26 10:49:39 +00:00