Commit Graph

44 Commits

Author SHA1 Message Date
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
Hugo
d69ef6a529 Remove redundant parentheses 2018-10-24 22:29:56 +03:00
Hugo
d36365f4fb
Merge pull request #3227 from kkopachev/master
Adding support to reading tiled and YcbCr jpeg tiffs through libtiff
2018-09-29 19:45:29 +03:00
Andrew Murray
a8261a2e89 Line too long 2018-09-27 20:35:00 +10:00
Konstantin Kopachev
300bdaad9e
Bring back YCbCrX in pack and unpack 2018-09-25 11:46:32 -07:00
Konstantin Kopachev
187782470b
Drop YCbCrX(XX) modes, as TIFF does not have to support that 2018-09-18 12:06:27 -07:00
Alexander Karpinsky
f7eb11cc3d
Merge branch 'master' into more-tiff-modes 2018-09-05 17:58:31 +03:00
Alexander
5b24987fc3 update code style in tests 2018-09-05 17:57:25 +03:00
Alexander
accc66fb5e add support for RGBaXX and RGBaX raw tiff modes 2018-09-05 17:45:03 +03:00
Alexander
ad5cf0a0e2 Add RGBAX and RGBAXX tiff modes 2018-09-05 17:36:27 +03:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Andrew Murray
ce5d0e72b2 Continuation line under-indented for visual indent 2018-07-02 19:21:44 +10:00
Andrew Murray
c13ccf13a1 Added missing whitespace 2018-03-06 19:53:07 +11:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
wiredfool
9a19858fb7
Merge pull request #2938 from uploadcare/tiff-with-optional-channels
Tiff with optional channels
2018-01-24 11:10:18 +00:00
Alexander
dc127273f4 Add RGBXX RGBXXX YCbCrXX YCbCrXXX rawmodes for TIFFs 2018-01-07 17:23:05 +03:00
Andrew Murray
62b2bdf909 Removed unused imports 2018-01-04 14:56:18 +11:00
Eric Soroos
7c629d7814 Added L;16/B pack functions 2017-09-29 13:41:39 +00:00
Alexander
eee3e2dd32 Missed not covered BGRa mode 2017-08-28 21:45:24 +03:00
Alexander
b9f3fa4a28 increase coverage 2017-08-28 21:18:25 +03:00
Alexander
82c986dfab Merge branch 'master' into 16-bit-rgb-tiff 2017-08-28 19:42:46 +03:00
Alexander
40fe1f721e unpacking tests for "I" and "F" modes 2017-08-28 19:22:59 +03:00
Alexander
aac0869ca7 Revert little-endian byte order for "I" and "F" rawmodes 2017-08-28 19:02:15 +03:00
Alexander
7f7b53447a Add tests for all new modes 2017-08-26 17:36:06 +03:00
Alexander
922407e7f3 fix py3, change test 2017-08-26 11:02:51 +03:00
Alexander
f43b9f396f Second part of pack tests 2017-08-26 10:49:28 +03:00
Alexander
8cb9cba1e0 Packing tests, first part. Fix RGBX packers 2017-08-24 00:58:39 +03:00
Alexander
a812f6c480 fix tests test_I16 2017-08-23 23:09:09 +03:00
Alexander
d33eab504d byte strings 2017-08-23 10:52:30 +03:00
Alexander
29aca0815a Third part of unpack tests 2017-08-23 10:27:13 +03:00
Alexander
5c2199c97b Second part of unpack tests 2017-08-23 01:55:55 +03:00
Alexander
f012fa15dd First part of unpack tests 2017-08-23 01:32:10 +03:00
Arjen Nienhuis
28ede3a327 Merged BGRa test into Tests/test_lib_pack.py 2016-08-08 00:07:08 +02:00
Arjen Nienhuis
2ecbcce415 add unpacking from BRGa 2016-08-07 13:32:19 +03:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
immerrr
d41fed6732 Enable basic support for 'RGBa' raw encoding/decoding 2015-02-02 13:06:56 +03:00
hugovk
cf04a9a0d2 Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
hugovk
3ec505958e Convert old tests to use unittest 2014-06-10 12:10:47 +03:00
Seth VanHeulen
89b2653135 Added tests for new 16 bit raw unpackers 2013-10-15 14:10:11 -04:00
Sandro Mani
2a2a1ea144 Fix tests which are hardcoded for little-endian CPUs 2013-04-07 19:02:11 +02: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
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