Commit Graph

16 Commits

Author SHA1 Message Date
nulano
703a9a0eb5 add pytest -ra into setup.cfg 2020-06-15 14:15:53 +02:00
Hugo
6d5c2d0cdf Add testpaths to tell pytest where to search for tests 2020-05-17 14:35:58 +03:00
Jon Dufresne
e1ccc296f2 Remove deprecated pytest-runner support
The pytest-runner package is deprecated and its use is discouraged. See:

https://github.com/pytest-dev/pytest-runner/

> pytest-runner depends on deprecated features of setuptools and relies
> on features that break security mechanisms in pip. For example
> 'setup_requires' and 'tests_require' bypass pip --require-hashes. See
> also https://github.com/pypa/setuptools/issues/1684.
>
> It is recommended that you:
>
> - Remove 'pytest-runner' from your 'setup_requires', preferably
>   removing the setup_requires option.
> - Remove 'pytest' and any other testing requirements from
>   'tests_require', preferably removing the setup_requires option.
> - Select a tool to bootstrap and then run tests such as tox

Running tests should go through the tox entrypoint.
2020-01-27 08:23:34 -08: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
83b99c6b12 pytest bug fixed on Python 3.8, can remove space 2019-07-05 15:55:06 +03:00
Hugo
56aa3b37b1 Report reason for pytest skips 2019-07-02 11:52:14 +03:00
Hugo
54dd0e479e Tell Flake8 to ignore non-PEP 8 compliant E203 and W503 2019-06-10 18:18:47 +03:00
Jon Dufresne
991795eb8e Remove deprecated license_file from setup.cfg
Starting with wheel 0.32.0 (2018-09-29), the "license_file" option is
deprecated.

https://wheel.readthedocs.io/en/stable/news.html

The wheel will continue to include LICENSE, it is now included
automatically:

https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
2019-05-09 19:16:47 -07: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
38d06173cc Set flake8 max-line-length to a common-ish value (80+10%) 2018-12-04 23:25:27 +02:00
Hugo
cc35bd70bc No need to run coverage on dev machines 2017-12-28 14:49:47 +00:00
hugovk
19bc6f0b96 No need for --cov-append 2017-12-28 14:48:19 +00:00
Hugo
3515ae3d9e Test with coverage on Windows, update 'setup.py test' 2017-12-28 14:48:19 +00:00
Jon Dufresne
a5c5277dde Include license file in the generated wheel packages
The wheel package format supports including the license file. This is
done using the [metadata] section in the setup.cfg file. For additional
information on this feature, see:

https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file
2017-10-15 12:15:07 -07:00
Alex Clark
b1030062ea setup.cfg considered harmful? 2010-07-30 23:24:37 -04:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00