Commit Graph

93 Commits

Author SHA1 Message Date
Andrew Murray
8f1157a61d Added type hints to Image.__init__() 2024-08-02 23:30:27 +10:00
Andrew Murray
4aa24f88d9
Added type hints to tests (#8203)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-05 11:56:24 -06:00
Hugo van Kemenade
51bd7d2ea8
Drop support for Python 3.8 (#8183)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-03 00:44:45 -06:00
Andrew Murray
267c0b37b1 Added type hints 2024-07-02 20:10:47 +10:00
Andrew Murray
cc83cc8ec8 Updated type hints 2024-06-22 10:09:11 +10:00
Yay295
c1f6abbd37
Fix test error message grammar 2024-04-11 14:07:07 -05:00
Andrew Murray
6d78d42769 Added type hints 2024-03-02 13:12:17 +11:00
Andrew Murray
3f6422b512 Added type hints 2024-02-12 09:28:53 +11:00
Andrew Murray
cdc498e6f3 Added type hints 2024-02-07 19:16:28 +11:00
Hugo van Kemenade
4a4b90c365
Autotype tests (#7756)
* autotyping: --none-return
* autotyping: --scalar-return
* autotyping: --int-param
* autotyping: --float-param
* autotyping: --str-param
* autotyping: --annotate-named-param tmp_path:pathlib.Path
2024-01-31 20:12:58 +11:00
Hugo van Kemenade
53c3cd9f8e isort Tests 2024-01-20 13:23:03 +02:00
Andrew Murray
2d6ad5868d Use "non-zero" consistently 2024-01-06 12:07:55 +11:00
Hugo van Kemenade
43b2f61e79 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
Yay295
4e6e69aafb remove loop left from before parametrization 2023-01-07 19:16:06 +11:00
Andrew Murray
c259ac492f Parametrized tests 2022-10-03 16:57:42 +11:00
Andrew Murray
3353ea80e1 Further parametrizations 2022-08-24 10:37:40 +10:00
Andrew Murray
0ed03d4a58 Parametrize tests 2022-08-23 21:41:32 +10:00
Hugo van Kemenade
ee85e387ba Remove redundant parentheses 2022-04-10 23:39:54 +03:00
Andrew Murray
f8e4e9c2dd Added enums 2022-01-15 09:02:31 +11:00
Eric Soroos
1c872a9eda lint stuff 2021-04-10 16:58:01 +02:00
Eric Soroos
a3a69c8385 conditional mark for valgrind ignore 2021-04-09 23:53:24 +02:00
Eric Soroos
1d7c8e03d0 known failing tests from valgrind -- uninitialized values 2021-01-07 14:52:02 +01:00
Hugo van Kemenade
e0eec1eb56 Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
Hugo van Kemenade
10615a7da7 Upgrade Python syntax for 3.6+
Co-authored-by: nulano <nulano@nulano.eu>
2020-07-30 10:09:18 +03:00
nulano
12cd02bd2d use xfail for failing tests 2020-06-14 19:38:21 +02:00
Hugo
44e661f25a Convert to use pytest 2020-02-22 23:03:01 +02:00
Hugo
699a9dadf1 Convert asserts 2020-02-22 18:07:04 +02:00
Andrew Murray
8482919a37 Converted most assert statements to pytest 2020-02-23 00:06:21 +11:00
Hugo
a4bf9fa036 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
Andrew Murray
a5f036abf4 Moved messages into assert method calls 2020-01-14 20:20:19 +11:00
Alexander
5b53b0489b Define box filter equal 1.0 on (-0.5, 0.5] range instead of [-0.5, 0.5) 2019-12-19 03:01:02 +03:00
Andrew Murray
c0048ad7de Use context managers 2019-11-26 07:03:23 +11:00
Jon Dufresne
33dabf986f Import unittest from stdlib rather than helper.py
The unittest in helper.py has not offered an interesting abstraction
since dbe9f85c7d so import from the more
typical stdlib location.
2019-11-20 18:42:52 -08:00
Hugo
12a725988e Merge remote-tracking branch 'upstream/master' into rm-2.7 2019-11-16 17:10:10 +02:00
Andrew Murray
511aed922a Fixed freeing unallocated pointer when resizing with height too large 2019-10-30 22:09:28 +11:00
Hugo
538d9e2e5d Upgrade Python syntax with pyupgrade --py3-plus 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
77f946d8bc Format with Black 2019-06-13 18:54:24 +03: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
Hugo
d69ef6a529 Remove redundant parentheses 2018-10-24 22:29:56 +03:00
Hugo
bab194b6f5 Fix DeprecationWarning: invalid escape sequence 2018-10-24 22:29:01 +03:00
Jon Dufresne
37f10651bd Clean up commented out debug print statements 2018-09-04 20:02:42 -07:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Andrew Murray
c19d77abed Continuation line under-indented for visual indent 2018-07-02 19:21:44 +10:00
Hugo
ecc4c7fecc Remove unittest regex deprecation warnings 2018-04-14 21:54:40 +03:00
Andrew Murray
cca94054aa Changed assert statements to unittest calls 2018-01-17 22:01:37 +11:00
Alexander
af3dcf84af python api for resources 2017-09-18 01:41:39 +03:00
Alexander
a7cf91499a Regular comments instead of strings [ci skip] 2017-09-01 08:42:57 +03:00
Alexander
edcbd3f67d Tests for skipping passes (are passed if disable the passes skipping) 2017-08-31 23:01:21 +03:00