Commit Graph

82 Commits

Author SHA1 Message Date
Hugo
5631718a8d Format with Black 2019-06-13 18:54:46 +03:00
Andrew Murray
21c7fd251c Fixed arc gaps 2019-05-03 23:37:37 +10: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
Andrew Murray
1e305380ae
Merge pull request #3094 from hugovk/add-width-to-shapes
Add line width parameter to rectangle and ellipse-based shapes
2018-09-29 23:21:03 +10:00
Andrew Murray
6dd0e48d9a Missing whitespace 2018-09-27 19:43:39 +10:00
Andrew Murray
b5af283732 Added support to floodfill for non-RGB colors 2018-09-26 22:22:17 +10:00
Andrew Murray
f3842460ba Added line joints 2018-09-16 21:29:09 +10:00
Andrew Murray
0411caba67 Catch ValueError when processing the edge of an image 2018-09-01 17:18:13 +10:00
Hugo
f70f952f85
Merge branch 'master' into add-width-to-shapes 2018-07-14 14:58:48 +03:00
Hugo
5d751572cc
Merge pull request #2922 from radarhere/fill_ink
Skip outline if the draw operation fills with the same colour
2018-07-02 22:19:35 +03:00
Hugo
d6e3ef85c2 Add width parameter to arc, chord, ellipse, pieslice 2018-07-02 11:26:42 +03:00
Hugo
9dedbff713 Add width parameter to rectangle 2018-07-02 11:21:30 +03:00
Andrew Murray
8d8d00f304 Changed ellipse point calculations to be more evenly distributed 2018-05-27 15:32:22 +10:00
Hugo
33592b4f73 No need to import sys 2018-05-17 23:21:47 +03:00
Hugo
90ab677d44 Re-enable test for PyPy 2018-05-17 22:18:18 +03:00
Andrew Murray
4d3339b703 Added tests 2018-01-05 11:26:24 +11:00
hugovk
5524d806b4 Failing test for #2783 2017-10-04 11:09:52 +00:00
Andrew Murray
5c2df30ac3 Removed ImageDraw.Draw del calls 2017-09-01 21:06:22 +10:00
Andrew Murray
9e843a2d9b Changed format of lambda calls 2017-09-01 21:05:40 +10:00
nediamond
d1b66e9dfd Added threshold parameter to ImageDraw.floodfill (#2599)
* added thresh option and test

* fixed up, test works and passes

* Update test_imagedraw.py

* Update test_imagedraw.py

* Update ImageDraw.py

* removed pypy skip decorator from thresh test

* Update ImageDraw.py
2017-07-01 10:37:02 +01:00
Hugo
08c72a1720 flake8 2017-05-16 10:33:38 +03:00
hugovk
206e316c0e Test limits of arc/ellipse's start and end 2017-05-15 22:58:51 +03:00
hugovk
f1631e0d05 Test drawing a rectangle bigger than the image 2017-05-15 21:44:28 +03:00
hugovk
5871b7a5ba Test drawing a wide "line" from one point to another just draws a single point 2017-05-15 21:32:54 +03:00
Hugo
ae9181f0a4 Test polygons in RGB and L modes 2017-05-15 18:24:12 +03:00
Hugo
e77c3b3eb2 Test ellipse in RGB and L modes 2017-05-15 18:23:00 +03:00
Hugo
d4a350cd79 Test chord in RGB and L modes 2017-05-15 18:04:33 +03:00
Hugo
3db1944762 Test drawing polygons with sloped and flat lines 2017-05-15 17:09:29 +03:00
Andrew Murray
37b293f593 Flake8 fixes 2017-04-20 21:14:23 +10:00
Andrew Murray
257bc8bd4f Added tests 2017-03-03 19:45:55 +11:00
wiredfool
a4ef743b0f Merge pull request #2220 from jdufresne/image-draw-dep
Remove long deprecated ImageDraw methods
2017-02-22 10:12:05 +00:00
hugovk
96dfd722c3 Test ImageDraw.Outline curve 2017-01-31 08:22:33 +02:00
hugovk
008431fe0e Test ImageDraw.Outline curve 2017-01-30 21:50:48 +02:00
Jon Dufresne
a5d6519d74 Remove long deprecated ImageDraw methods
Deprecated in 89ccf66ff7 since Sep 29,
2015, version 3.0.0.
2016-11-13 10:08:47 -08:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
Andrew Murray
3c2e374824 Added test 2016-06-09 22:28:29 +01:00
Andrew Murray
8f9b3a7372 Changed arcs, chords and pie slices to use floats 2015-12-09 00:28:52 +11:00
Andrew Murray
f0944438ab Removed FIXME from ImageDraw test 2015-12-08 00:03:38 +11:00
wiredfool
89ccf66ff7 Merge pull request #1343 from radarhere/deprecated
Removed deprecated code
2015-09-29 15:38:34 +01:00
Andrew Murray
71c95c8e5f Restored deprecated methods with errors instead 2015-09-19 21:36:19 +10:00
Andrew Murray
c6b13d294f Flake8 fixes 2015-08-25 22:27:18 +10:00
Andrew Murray
94ed100bb2 Removed ImageDraw methods deprecated in PIL 1.1.15 2015-07-13 17:41:26 +10:00
Andrew Murray
309ab1fc3d Various Flake8 fixes 2015-07-03 16:22:56 +10:00
Andrew Murray
a06b59bd52 Added various tests 2015-07-03 15:03:25 +10:00
Andrew Murray
a1b71d5ee0 Added test for polygon edge drawing 2015-06-06 00:46:50 +10:00
Andrew Murray
a996033079 Fixed various typos 2015-05-29 14:59:54 +10:00
Andrew Murray
d1c182cadc Various Flake8 fixes 2015-04-24 09:26:52 +10:00
wiredfool
1bb850427d Slightly relax imagedraw tests to pass on x86 2014-09-30 08:33:29 -07:00