Commit Graph

62 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
0d90bc8187 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-12-27 13:57:22 +00:00
Nulano
3a4298d16c avoid hard dependency on typing_extensions 2023-12-27 14:55:30 +01:00
Hugo van Kemenade
acc8f95f9b
Add NumPy to tox for mypy
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-12-19 11:25:42 +02:00
Hugo van Kemenade
b8605eaa84 Check types with mypy 2023-12-19 09:23:43 +02:00
Hugo van Kemenade
ab990fab77 Add support for Python 3.12 2023-07-12 16:31:45 +03:00
Andrew Murray
18da2d0b2d Removed inplace target 2023-05-20 15:38:53 +10:00
pre-commit-ci[bot]
a766fa4cd1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-05-01 19:16:03 +00:00
Hugo van Kemenade
6c057b3277 Run tox-ini-fmt 2023-04-03 23:08:23 +03:00
Hugo van Kemenade
596569c928 Drop support for soon-EOL Python 3.7 2023-04-01 15:58:08 +03:00
Hugo van Kemenade
bfa1f3290c Add allowlist_externals=make to fix tox 4 2022-12-13 18:06:58 +02:00
Hugo van Kemenade
1f9754cdc0 Format tox.ini with tox-ini-fmt 2022-12-13 18:04:30 +02:00
Hugo van Kemenade
6801a255a3 Add support for Python 3.11 2022-07-15 13:42:36 +03:00
Hugo van Kemenade
b14aa51037 Replace requirements.txt with extras_require 2022-02-24 17:59:34 +02:00
Andrew Murray
c202fc7f93 Replaced further direct invocations of setup.py 2021-12-24 11:12:51 +11:00
Hugo van Kemenade
716a0baf74 Drop support for EOL Python 3.6 2021-10-19 15:34:52 +03:00
Hugo van Kemenade
e7d1b2f4cb Add support for Python 3.10 2021-07-01 13:29:44 +03:00
Andrew Murray
6a50e1076a Invoke pip using Python 2020-10-29 22:41:29 +11:00
Hugo van Kemenade
6f7231eb5a Add Trove classifier, update setup.py version check, add to tox.ini 2020-10-06 19:16:49 +03:00
Hugo
6cdeb55118 Drop support for soon-EOL Python 3.5 2020-06-30 13:55:08 +03:00
Hugo
7e3556e5f6 GHA: Force colour output of pre-commit 2020-06-22 12:27:08 +03:00
Hugo
c4c1b51f45 pre-commit: when hooks fail, run 'git diff' directly afterwards 2020-06-22 12:27:08 +03:00
Hugo
995707f3ad Run lint with pre-commit 2020-03-22 10:36:55 +02:00
Andrew Murray
1671f6bd71 Show all warnings 2020-01-26 17:48:28 -08:00
Jon Dufresne
2b84221edf Fix ResourceWarning emitted during tests
Appeared in the form:

    ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/invalid-exif-without-x-resolution.jpg'>

Enable all warnings to always display during tests to help catch these
warnings earlier.
2020-01-26 16:00:46 -08:00
Hugo
6f88d8dd6b black --target-version py35 2019-11-02 20:02:07 +02:00
Hugo van Kemenade
40133cfc74
Merge branch 'master' into rm-2.7 2019-10-26 09:07:44 +03:00
Hugo
2ab518edcb Add support for Python 3.8 2019-10-15 12:44:21 +03:00
Hugo van Kemenade
28ff798889
Merge branch 'master' into rm-2.7 2019-10-15 12:11:43 +03:00
Jon Dufresne
911079cc68 Add PyPy3 to the tox test matrix
Allows contributors to automatically test locally.
2019-10-12 07:56:43 -07:00
Hugo
af770a6c55 Drop support for EOL Python 2.7 2019-10-07 14:30:59 +03:00
Jon Dufresne
d50445ff30 Introduce isort to automate import ordering and formatting
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.

Uses the configuration recommended by the Black to avoid conflicts of
style.

Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Hugo
471220093b Format with Black 2019-06-13 18:54:57 +03:00
Hugo
2bedb83a84 Check Black during CI lint 2019-06-10 18:18:47 +03:00
Hugo
1885a2cef5
Merge pull request #3579 from jdufresne/run-one-test
Improve pytest configuration to allow specific tests as CLI args
2019-02-03 11:30:57 +02:00
Hugo
84248dc642
Merge branch 'master' into tox-flake8 2019-01-27 10:53:30 +02:00
Hugo
d6055440d5 Drop support for EOL Python 3.4 2019-01-24 23:33:14 +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
Jon Dufresne
e19d8dd84b Add linting to the tox matrix
Allows contributors to easily run the lint stage with a single command:
`tox -e lint`. This creates shorter round trips with CI in case of an
error.

Update the Travis configuration to use the new environment to run lint.
This allows using a single/common source of truth to reduce differences
between Travis and local testing.

The tox environment uses the skip_install feature as static analysis
doesn't requiring install the Pillow package itself to run. This feature
requires tox 1.9 (2015-02-24), so a minimum tox version was added to the
configuration.

https://tox.readthedocs.io/en/latest/config.html#conf-skip_install
2019-01-13 08:55:06 -08:00
Jon Dufresne
45740b4a28 Install optional dependencies in tox environment
Improves test coverage by reducing skipped tests when testing through
tox.
2019-01-07 21:12:07 -08:00
Hugo
fe0b78b98d Support Python 3.7 2018-04-05 13:52:48 +03:00
Jerome Leclanche
31409bc83d tox: Allow passing arguments from tox to pytest 2018-03-06 18:16:26 +02:00
Jerome Leclanche
d2c73c4882 tox: Add pytest to test deps 2018-03-06 18:16:26 +02:00
Andrew Murray
38279f8cd6 Removed py33 from tox envlist 2017-12-31 11:53:38 +11:00
Hugo
b55ea4014e Calls pytest directly 2017-12-28 14:48:19 +00:00
Andrew Murray
18dcc438c1 Fixed URL 2017-05-15 19:56:16 +10:00
Andrew Murray
3e2f9478cb Added py36 to tox envlist 2016-12-27 02:28:11 -08:00
Jon Dufresne
85cf6d3140 Drop support for Python 3.2 2016-11-22 04:24:40 -08:00
Jon Dufresne
dbe9f85c7d Drop support for Python 2.6
* Drop unittest2 requirement
* Use set literals
* Use dict/set comprehension
* Use str.format() automatic numbering
2016-11-22 04:23:55 -08:00
Andrew Murray
81b7570717 Added py35 to tox envlist 2016-02-10 12:41:45 +11:00
Andrew Murray
f1f00c0662 Updated Tox URL 2015-12-28 10:05:13 +11:00