Commit Graph

16 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
7e8998a452 ImageOps.box_blur is deprecated, use ImageFilter.BoxBlur instead 2018-04-14 21:54:40 +03:00
Alexander
6900a7707f ImageFilter.BoxBlur 2017-09-14 01:59:25 +03:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
homm
edc9880b61 accept RGBa and La modes for blur 2016-05-27 03:16:48 +03:00
hugovk
c859e3bf40 Some landscape.io fixes 2014-11-27 21:43:45 +02:00
homm
65173f946b replace gaussian blur with extended box blur implementation 2014-10-25 16:36:41 +04:00
homm
c80fe312e4 Add extended box blur. 2014-10-20 10:48:16 +04:00
homm
f477cab940 test for multiple passes 2014-10-19 20:56:14 +04:00
homm
5ab12e0ee7 improve test: test grayscale and rgba with same cases 2014-10-19 13:54:18 +04:00
homm
0ff4b53a72 pep8 2014-10-15 12:40:26 +04:00
homm
53c8352f39 highlevel api 2014-10-15 04:08:21 +04:00
homm
5861a46a54 check image mode 2014-10-14 23:29:50 +04:00
homm
a27baf90be fix large radius. tests 2014-10-14 03:26:46 +04:00
homm
a000cceb26 data tests 2014-10-13 04:07:17 +04:00