Commit Graph

110 Commits

Author SHA1 Message Date
Jon Dufresne
e544fd5fb7 Simplify command discovery with stdlib shutil.which()
Use the builtin shutil.which() instead of reimplementing.

For the single use that used the output of the command, use
subprocess.run().
2020-02-14 14:55:46 -08:00
Hugo
38bf862185 Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
Hugo
a4bf9fa036 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
Jon Dufresne
63729766c4 Remove unnecessary coerce to float
In Python 3, the division operator is floating point division. No longer
need to coerce integers to floating point numbers before division.
2020-01-26 06:33:18 -08:00
Andrew Murray
d324560891 Removed print 2020-01-14 19:44:10 +11:00
Andrew Murray
a4f06b93f9 Removed unused function 2020-01-14 19:40:21 +11:00
Hugo
5e9336af4c Use sys.byteorder == "big" 2020-01-08 15:43:28 +02:00
Hugo
f96763826c Test on new Travis CPUs https://blog.travis-ci.com/2019-11-12-multi-cpu-architecture-ibm-power-ibm-z 2020-01-08 15:43:27 +02:00
Hugo
e5486b40f8 Merge remote-tracking branch 'upstream/master' into rm-2.7 2019-11-18 13:56:42 +02:00
nulano
197fb91574 upload image errors to GitHub Actions 2019-11-17 21:49:58 +11:00
Hugo van Kemenade
40133cfc74
Merge branch 'master' into rm-2.7 2019-10-26 09:07:44 +03:00
Hugo van Kemenade
1a9be9ccbd
Simpilify PillowTestCase.delete_tempfile for pytest (#4139)
Simpilify PillowTestCase.delete_tempfile for pytest
2019-10-22 14:14:20 +03:00
Hugo van Kemenade
28ff798889
Merge branch 'master' into rm-2.7 2019-10-15 12:11:43 +03:00
Jon Dufresne
9981568982 Simpilify PillowTestCase.delete_tempfile for pytest
As the test suite always runs with pytest now, self.currentResult is
always None. Using this, can remove unused code.
2019-10-12 11:13:14 -07:00
Jon Dufresne
0affbacd5e Remove unused arguments from PillowTestCase.skipKnwonBadTest() 2019-10-12 08:17:20 -07:00
Andrew Murray
4140cd807b
Merge branch 'master' into rm-2.7 2019-10-12 18:03:58 +11:00
Hugo
84e53e3757 Simplify using subprocess.DEVNULL
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-08 17:25:42 +03:00
nulano
a0a5601689
Merge branch 'master' into gha-win 2019-10-08 12:56:43 +01:00
Andrew Murray
6cd99fc3cf
Merge branch 'master' into rm-2.7 2019-10-08 18:57:27 +11:00
Jon Dufresne
64032061c0 Move several imports to the top-level of the file
This better follows PEP 8 style guide:

https://www.python.org/dev/peps/pep-0008/#imports

> Imports are always put at the top of the file, just after any module
> comments and docstrings, and before module globals and constants.

This also avoids duplicate import code within the same file.
2019-10-07 06:28:36 -07:00
Hugo
538d9e2e5d Upgrade Python syntax with pyupgrade --py3-plus 2019-10-07 14:30:59 +03:00
Hugo
af770a6c55 Drop support for EOL Python 2.7 2019-10-07 14:30:59 +03:00
nulano
cf1f8b0498 Tests.helper cleanup 2019-09-25 11:58:02 +02:00
nulano
4d35cb9d0a test-windows.yml pypy3, use actions/setup-python 2019-09-25 09:17:38 +02:00
Andrew Murray
508a2b48f0 Test show method on CIs 2019-09-21 22:28:05 +10: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
d08475442b Format with Black 2019-06-13 18:53:42 +03:00
Andrew Murray
06f47ea546 Revert "Use bare 'raise' to re-raise exceptions"
This reverts commit 80e96b2c7b.
2019-01-14 21:55:47 +11:00
Jon Dufresne
80e96b2c7b Use bare 'raise' to re-raise exceptions
Slightly more concise and nicer syntax
2019-01-12 18:45:37 -08:00
Jon Dufresne
8a05aae988 Remove unused PillowTestCase.__str__
With the move to pytest, the class's string method is unused. pytest has
its own test progress outputter.
2019-01-06 15:18:18 -08:00
Hugo
c353225851 Prefer 'except Exception:' to bare 'except:' 2018-12-04 23:25:28 +02:00
Hugo
5df41b4399 Unnecessary generator - rewrite as a list comprehension 2018-10-24 22:29:56 +03:00
Hugo
619e5fde8d Remove unused local variables 2018-10-24 22:29:01 +03:00
Hugo
a3b0659790 flake8 2018-10-24 22:29:01 +03:00
Hugo
d1ca4916e0 Use more specific assertions 2018-10-24 22:29:01 +03:00
Andrew Murray
a8261a2e89 Line too long 2018-09-27 20:35:00 +10:00
tsennott
50d6611587 moved tuple test to assert method in PillowTestCase; added docs 2018-07-09 07:04:48 -07:00
tsennott
1eed17c70e tightened up colorize(); split tests; moved tuple comparison fcn to helper.py 2018-07-08 20:09:39 -07:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Andrew Murray
1c88afe5c0 Changed OS X references to macOS 2018-05-13 20:55:04 +10:00
Andrew Murray
c38f25a876 Corrected documentation syntax 2018-05-13 20:52:11 +10:00
Andrew Murray
b4e6cdadac Added py3 variable to _util 2018-04-20 09:19:13 +10:00
Hugo
ecc4c7fecc Remove unittest regex deprecation warnings 2018-04-14 21:54:40 +03:00
wiredfool
c004b6beaa
Merge pull request #2998 from hugovk/simplify-version-checks
Simplify version checks
2018-03-21 07:50:51 +00:00
Andrew Murray
4a781d0013 Replaced MacOS with macOS 2018-03-19 19:38:17 +11:00
hugovk
0b2a77e8e4 Use named version attribute 2018-03-12 10:37:18 +02:00
Andrew Murray
c13ccf13a1 Added missing whitespace 2018-03-06 19:53:07 +11:00
Andrew Murray
f22f1628eb At least two spaces before inline comment 2018-03-04 21:36:33 +11:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
Metallicow
5e94cd0fc2 Trim trailing whitespace tests dir 2018-01-27 00:07:24 -06:00