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
fc92f56382
replace skip_known_bad_test with xfail
2020-06-14 20:21:26 +02:00
nulano
d54fee9863
move import
2020-05-25 22:21:51 +02:00
nulano
d2f90d6cac
fix freetype and raqm on MSYS
2020-05-23 23:16:06 +02:00
Hugo
654229d1b9
GitHub Actions now sets CI=true
2020-04-16 20:42:29 +03:00
Andrew Murray
b602f365ae
Removed PillowTestCase helper class
2020-03-28 12:51:28 +11:00
Hugo
2cc6a9a974
Convert to use pytest
2020-03-02 16:31:08 +02:00
Andrew Murray
8482919a37
Converted most assert statements to pytest
2020-02-23 00:06:21 +11:00
Jon Dufresne
4f185329f4
Streamline test skipping based on supported features
...
This adds a new test decorator: skip_unless_feature(). The argument is
the same as passed to features.check(). If the feature is not supported,
the test will be skipped.
This removes several kinds of boilerplate copied and pasted around tests
so test feature checking is handled and displayed more consistently.
Refs #4193
2020-02-18 13:07:01 -08:00
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
Hugo
7df920303c
Remove nose-specific code
2017-12-28 14:48:19 +00:00
hugovk
e30433e4b2
Test testing with pytest
2017-12-28 14:48:19 +00:00
Eric Soroos
bec8f415be
end to end test helper, more end to end tests for tiffs
2017-12-20 11:55:40 +00:00
Hugo
070e66fe7b
flake8
2017-12-19 17:16:15 +02:00
Hugo
8adab0ec0d
Noise effect: take five pixels, assert not all same
2017-12-19 17:12:58 +02:00
Jon Dufresne
c5a0d72c10
Remove unnecessary bool() calls throughout project
...
Can use truthy values in boolean expressions without first coercing to a
bool. Removes unnecessary call to bool().
2017-12-16 09:34:12 -08:00
Eric Soroos
5a8fd796e9
install the difference engine
2017-11-17 19:47:05 +00:00
hugovk
cde8c1b560
Improve assert_warning() error message for warn_class=None
2017-09-23 22:36:42 +03:00
hugovk
77f0608c4e
Failing test for ResourceWarning on Python 3
2017-09-23 22:36:03 +03:00
wiredfool
ed68328c09
refactored memory leak test case
2017-09-04 09:58:05 +00:00
Andrew Murray
37b293f593
Flake8 fixes
2017-04-20 21:14:23 +10:00
Andrew Murray
0b93853fd8
Removed duplicate imports
2017-03-03 21:38:19 +11:00
wiredfool
8421a076ac
Merge pull request #2253 from jdufresne/devnull
...
Send unwanted subprocess output to /dev/null
2017-02-22 10:10:03 +00:00
Eric Soroos
1b94ff81fe
Skip failing QPixmap/QT5 tests on Arch
2017-02-20 08:51:17 -08:00
Jon Dufresne
cecdb2af61
Send unwanted subprocess output to /dev/null
...
Avoids unnecessary creation of temporary files as well as unnecessarily
storing process output in memory. The temporary files would sometimes
remain and not be cleaned up.
2017-01-26 17:31:29 -08:00
Hugo
bceee54895
Prevent nose -v printing docstrings ( #2369 )
2017-01-20 19:10:02 +00:00
Andrew Murray
a06dd59df7
Added context managers
2016-12-28 09:54:10 +11:00
Alexander
9ee1f58215
fix I;16 mode
2016-12-07 05:16:10 +03:00
Alexander
ba92896a53
remove old version
2016-12-07 04:39:36 +03:00
Alexander
8967a20ad7
test new assert_image_similar implementation
2016-12-07 03:07:20 +03: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
Jon Dufresne
ffa5bc2726
Use generator expressions instead of list comprehension
...
Avoids unnecessary temporary lists in memory.
2016-11-14 18:11:15 -08:00
homm
cdd0624945
improve tests
2016-09-19 03:12:53 +03:00
wiredfool
e980ca7896
Merge pull request #2010 from uploadcare/jpeg-raise-on-alpha
...
Show warning when trying to save RGBA image as JPEG
2016-08-25 11:41:49 +01:00
homm
193c756139
return implicit RGBA to JPEG save, raise warning
2016-08-09 03:11:35 +03:00
homm
1ba4e9e5ba
remove end of file banner from all files
2016-07-10 14:11:28 +03:00
Antony Lee
93abbd0caa
Restore legacy TIFF API.
...
To have the old API that always returns tuples, and fractions as pairs,
set the `legacy_api` attribute of the IFD to True.
This should alleviate concerns about backwards compatibility.
2015-09-11 22:39:37 +01:00
Andrew Murray
bbf3b52357
Flake8 fixes
2015-06-20 14:46:04 +10:00
wiredfool
1086ba9e6e
Function rename
2015-06-16 13:35:34 -07:00
wiredfool
0347bcc91d
Tests that faill on appveyor CI, but pass on a real machine
2015-06-12 09:56:12 -07:00
Andrew Murray
d1c182cadc
Various Flake8 fixes
2015-04-24 09:26:52 +10:00
Alex Clark
9c37a29553
Merge pull request #982 from hugovk/cache
...
Re-enable test image caching
2015-03-31 21:36:24 -04:00
Andrew Murray
128280e5b8
Fixed duplicate import in Tests helper
2015-04-01 09:56:04 +11:00
homm
a86e032a18
return fresh image is no mode specified and cached version otherwise
2014-11-19 03:41:44 +03:00
hugovk
fb788b85a9
Cache hopper to reduce FS reads and speed up tests
2014-10-29 21:28:29 +02:00
Hugo
ae7b765b53
Fix some Landscape.io errors and warnings
2014-10-01 16:50:33 +03:00
wiredfool
460160a1e3
Updated merge from master
2014-09-26 16:07:52 -07:00
Hugo
0aa48600a2
Add a layer to hopper.psd, because lena.psd had layers
2014-09-23 17:09:43 +03:00
Hugo
5e676ea0bd
Merge remote-tracking branch 'upstream/master' into flake8
...
Conflicts:
Tests/bench_cffi_access.py
Tests/test_file_palm.py
Tests/test_format_hsv.py
Tests/test_image_putdata.py
Tests/test_locale.py
Tests/test_mode_i16.py
2014-09-23 16:35:20 +03:00
Christoph Gohlke
09ba5560d8
On Windows, do not execute convert.exe without specifying path
...
Convert.exe is a system tool that converts file systems
2014-09-21 17:50:07 -07:00
hugovk
337b222438
Add note to lena()/hopper() functions
2014-09-14 21:44:29 +03:00