Commit Graph

29 Commits

Author SHA1 Message Date
Hugo
1885a2cef5
Merge pull request #3579 from jdufresne/run-one-test
Improve pytest configuration to allow specific tests as CLI args
2019-02-03 11:30:57 +02:00
Hugo
84248dc642
Merge branch 'master' into tox-flake8 2019-01-27 10:53:30 +02:00
Hugo
d6055440d5 Drop support for EOL Python 3.4 2019-01-24 23:33:14 +02: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
Jon Dufresne
e19d8dd84b Add linting to the tox matrix
Allows contributors to easily run the lint stage with a single command:
`tox -e lint`. This creates shorter round trips with CI in case of an
error.

Update the Travis configuration to use the new environment to run lint.
This allows using a single/common source of truth to reduce differences
between Travis and local testing.

The tox environment uses the skip_install feature as static analysis
doesn't requiring install the Pillow package itself to run. This feature
requires tox 1.9 (2015-02-24), so a minimum tox version was added to the
configuration.

https://tox.readthedocs.io/en/latest/config.html#conf-skip_install
2019-01-13 08:55:06 -08:00
Jon Dufresne
45740b4a28 Install optional dependencies in tox environment
Improves test coverage by reducing skipped tests when testing through
tox.
2019-01-07 21:12:07 -08:00
Hugo
fe0b78b98d Support Python 3.7 2018-04-05 13:52:48 +03:00
Jerome Leclanche
31409bc83d tox: Allow passing arguments from tox to pytest 2018-03-06 18:16:26 +02:00
Jerome Leclanche
d2c73c4882 tox: Add pytest to test deps 2018-03-06 18:16:26 +02:00
Andrew Murray
38279f8cd6 Removed py33 from tox envlist 2017-12-31 11:53:38 +11:00
Hugo
b55ea4014e Calls pytest directly 2017-12-28 14:48:19 +00:00
Andrew Murray
18dcc438c1 Fixed URL 2017-05-15 19:56:16 +10:00
Andrew Murray
3e2f9478cb Added py36 to tox envlist 2016-12-27 02:28:11 -08:00
Jon Dufresne
85cf6d3140 Drop support for Python 3.2 2016-11-22 04:24:40 -08: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
Andrew Murray
81b7570717 Added py35 to tox envlist 2016-02-10 12:41:45 +11:00
Andrew Murray
f1f00c0662 Updated Tox URL 2015-12-28 10:05:13 +11:00
Andrew Murray
1c7a140298 Fixed tox test script path 2015-06-27 09:10:01 +10:00
Hugo
9fd69fa717 Add Python 3.4 2015-05-18 11:29:32 +03:00
Felipe Reyes
690e6970f6
Added clean/build to tox to make it behave like travis 2013-07-08 23:10:21 -04:00
Alex Clark
a67b849bb0 Back to all four, fixes #79 2013-03-08 12:19:25 -05:00
Alex Clark
00b43ac81a "Officially" only support 2.7 and 3.3 2013-03-08 09:47:03 -05:00
Alex Clark
955dfc07d3 Only test 2.6, 2.7, and 3.3 2013-03-08 09:12:06 -05:00
Alex Clark
de957b6382 Travis not using tox.ini? 2013-03-07 09:06:51 -05:00
Alex Clark
23e665ac50 Try running just run.py 2013-03-07 09:00:47 -05:00
Mikhail Korobov
fbcc9b5c77 Test running improvements: all tests can be run with tox; run.py script exits with an error code in case of failures. 2013-02-26 16:03:25 +06:00
Mikhail Korobov
decabcf96a Fix tox test running: port selftest.py to Python 3; make it clear Python 2.5 is no longer supported (its support is broken in many ways in this branch); remove bundled doctest.py module (it is in stdlib since forever); remove extra stuff from tox.ini 2013-01-10 08:50:52 -06:00
Marc Abramowitz
01917a4faf Make things more Python 3 friendly. Python 3 still doesn't work because
of C code that doesn't compile with Python 3.
2012-06-12 13:48:27 -07:00
Marc Abramowitz
a005018a4e Add support for tox (http://tox.testrun.org/) 2012-06-11 23:26:40 -07:00