Commit Graph

484 Commits

Author SHA1 Message Date
Bruno Oliveira 04a941c818 Pass PYTEST_ADDOPTS to tox envs [skip travis] [skip appveyor] 2019-02-12 20:31:29 -02:00
Daniel Hahler 5e2d740829 tox: cleanup/revisit deps 2019-02-10 14:02:56 +01:00
Daniel Hahler 82b8ec37fc Bump tox minversion
For c611a16afe
2019-02-10 13:57:49 +01:00
Daniel Hahler fd1684e70b tox: use deps for pluggymaster testenvs
https://github.com/tox-dev/tox/issues/706 has been fixed.
2019-02-10 13:53:49 +01:00
Daniel Hahler 8b92d10fb3
Merge pull request #4751 from blueyed/fix-py-freeze
tox: py37-freeze: use --no-use-pep517 for PyInstaller
2019-02-08 22:01:59 +01:00
Daniel Hahler e191a65ebb tox: py37-freeze: use --no-use-pep517 for PyInstaller
Fixes https://github.com/pytest-dev/pytest/issues/4750.
2019-02-08 21:59:23 +01:00
Bruno Oliveira 9be069f899 Use isolated_build option in tox.ini
As per the excellent article by gaborbernat:

https://www.bernat.tech/pep-517-518/
2019-02-08 15:50:33 -02:00
Bruno Oliveira 0c5e717f43 Add py38-dev job to Travis 2019-02-06 13:11:00 -02:00
Anthony Sottile 4f38c610c3 Uninstall hypothesis in regen tox env 2019-01-06 07:53:39 -08:00
Bruno Oliveira 5a8e674e92 Add dataclasses as a regendoc dependency 2019-01-05 16:38:59 -02:00
Ronny Pfannschmidt b258764ffe fix docs 2018-12-21 14:02:38 +01:00
Bruno Oliveira b73e083d9d Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-11-26 12:55:05 -02:00
Anthony Sottile d219e033e9 Fix rtd by installing pygments-pytest 2018-11-24 14:48:12 -08:00
Anthony Sottile 7015801377 Highlight docs with pygments-pytest 2018-11-23 22:01:30 -08:00
Bruno Oliveira f987b368e8
Merge pull request #3776 from alysivji/attrs-n-dataclasses
Detailed assert failure introspection for attrs and dataclasses objects
2018-11-22 21:25:35 -02:00
Bruno Oliveira d52ea4b6cf Use python 3 in 'doctesting' environment
We some examples now use type annotations
2018-11-19 20:06:06 -02:00
Daniel Hahler c56cc93cbd tox.ini: remove additionally missed mock deps
Ref: https://github.com/pytest-dev/pytest/pull/4415#discussion_r234452144
2018-11-18 19:37:04 +01:00
Daniel Hahler e46f995cc7 setup.py: add "testing" extra requirement
Use this in tox to stream-line base testing requirements.

Closes https://github.com/pytest-dev/pytest/issues/4410.
2018-11-18 08:55:17 +01:00
Daniel Hahler 7f990e2b9a
Merge pull request #4408 from blueyed/default-invalid-escape-sequence
tox.ini: do not cause SyntaxWarning with py37  [ci skip]
2018-11-17 20:08:37 +01:00
Daniel Hahler cb1d4044e6 tox: fix/improve posargs with pexpect factor(s) [ci skip] 2018-11-17 15:35:40 +01:00
Daniel Hahler 084c36d538 tox.ini: do not cause SyntaxWarning with py37 [ci skip]
Do not cause a SyntaxError for something like:

> DeprecationWarning: invalid escape sequence \w

This was happening via pdb++ when it imported pygments (and that had no
compiled .pyc file).
2018-11-17 11:53:15 +01:00
Bruno Oliveira 557cb6cffe Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-11-13 09:01:37 -02:00
Bruno Oliveira dc20dedbc7 Change RemovedInPytest4Warnings to errors by default
To keep existing tests which emit RemovedInPytest4Warnings running, decided
to go with a command line option because:

* Is harder to integrate an ini option with tests which already use an ini file
* It also marks tests which need to be removed/updated in 4.1, when
  RemovedInPytest4Warning and related functionality are removed.

Fix #3737
2018-11-12 16:10:57 -02:00
Bruno Oliveira 0df5ce4082 Fix basepython for linting testenv in tox.ini 2018-11-12 14:03:04 -02:00
Daniel Hahler 935b106213 CI: use py37 instead of py36 by default
Closes https://github.com/pytest-dev/pytest/issues/4370.
2018-11-12 03:16:52 +01:00
Bruno Oliveira 864d7fef30 Add back some {posargs} placeholders for pytest invocations in tox.ini
Those were removed by accident in a previous commits it seems
2018-10-18 21:57:11 -03:00
Bruno Oliveira ee0a306ee4 Merge remote-tracking branch 'upstream/features' into merge-features-into-master 2018-10-16 17:41:27 -03:00
Bruno Oliveira 12edc4e7b8 Pass TRAVIS env var to test environments [skip appveyor]
xdist has an workaround inplace for Travis so "-n auto" works.

Fix #4162
2018-10-15 20:06:59 -03:00
Bruno Oliveira 9646a1cd7a Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-10-15 12:55:28 -03:00
Bruno Oliveira 6258248865
Merge pull request #4138 from blueyed/cov-pexpect
tox.ini: clean up changedir
2018-10-14 15:41:54 -03:00
Daniel Hahler 323c846ce6 tox.ini: fix testpaths
Broken recently in 307fa7a4 (features branch).

[ci skip] (since it apparently is not tested/used there)
2018-10-14 17:05:28 +02:00
Daniel Hahler 3bd9f981a2 tox.ini: clean up changedir 2018-10-14 14:33:28 +02:00
Daniel Hahler 7c380b19f3 tox.ini: passenv: COVERAGE_*
This is required to pass through COVERAGE_PROCESS_START etc.
2018-10-14 12:34:17 +02:00
Daniel Hahler 4a49715614 tox.ini: pexpect: use posargs; cleanup posargs
- no need for {posargs:testing} really
- remove `-ra`, used with addopts already
2018-10-14 00:08:46 +02:00
Daniel Hahler 307fa7a42a tox.ini: use testpaths, cleanup other pytest options 2018-10-12 17:07:45 +02:00
Daniel Hahler 03eaad376b tox: coverage factor: combine and report 2018-09-17 14:44:47 +02:00
Daniel Hahler 93224f8cf9 tox: remove obsolete whitelist_externals 2018-09-17 14:44:47 +02:00
Daniel Hahler 7537e94ddf tests: use unittest.mock with py34+
Fixes https://github.com/pytest-dev/pytest/issues/3965.

Has to work around https://github.com/tox-dev/tox/issues/706.

No coverage for pluggymaster builds is OK though anyway.
2018-09-12 23:21:47 +02:00
Anthony Sottile 826adafe2e Improve pre-commit detection for changelog filenames 2018-09-07 09:36:09 -07:00
Bruno Oliveira c00d934b21
Merge pull request #3933 from nicoddemus/idval-hypothesis-flaky-3707
Use -n auto now that xdist behaves well in Travis and AppVeyor
2018-09-06 15:15:55 -03:00
Bruno Oliveira 5eb85efa14 Use -n auto now that xdist behaves well in Travis and AppVeyor
This hopefully fixes the flaky test_idval_hypothesis on AppVeyor

Fix #3707
2018-09-06 09:22:13 -03:00
Bruno Oliveira 8c4ca383ca Merge remote-tracking branch 'upstream/features' into merge-features-into-master 2018-09-06 09:15:56 -03:00
Bruno Oliveira 5e2bd17d18 White list external "env" used by Travis for coverage 2018-09-05 22:37:32 -03:00
Bruno Oliveira ec6fca4aa7 Add codecov support to AppVeyor and remove coveralls 2018-09-05 19:50:06 -03:00
Bruno Oliveira 415a62e373 Fix typo in PytestExperimentalApiWarning 2018-09-04 11:35:35 -03:00
Bruno Oliveira 8ce3aeadbf Move PytestExerimentalApiWarning to warning_types 2018-09-04 11:35:35 -03:00
Bruno Oliveira 19a01c9849 Make PytestWarning and RemovedInPytest4Warning part of the public API 2018-09-04 11:35:34 -03:00
Bruno Oliveira 78ac7d99f5 Deprecate Config.warn and Node.warn, replaced by standard warnings 2018-09-04 11:35:34 -03:00
Daniel Hahler 417516c378 squash! Travis: report coverage with all builds
doctesting: remove changedir

With coverage 5 we could use COVERAGE_RCFILE to make it find the
.coveragerc, or we could add `--rcfile` to _PYTEST_TOX_COVERAGE_RUN, but
I've thought that this should not be the job that has to test if
`--pyargs` actually works.
2018-08-29 22:53:20 +02:00
Daniel Hahler f730291e67 Travis: report coverage with all builds
- Skips pypy for coverage, reports only py37 to coveralls
- tox: allow for TOXENV=py37-coverage
- tracks coverage in subprocesses, using coverage-enable-subprocess, and
  parallel=1
- removes usedevelop with doctesting to match `--source` being used with
  coverage
- keep coveralls for now, used with AppVeyor
2018-08-29 22:30:28 +02:00
Bruno Oliveira 4d19b94347
Merge pull request #3877 from blueyed/codecov-master
tox: coveralls: also report to codecov
2018-08-26 09:19:03 -03:00
Daniel Hahler d3f5324386 tox: coveralls: also report to codecov
This is meant to get base coverage on master for codecov.
2018-08-26 02:14:22 +02:00
Anthony Sottile 3da88d794f Use skip_install for testing tox env 2018-08-25 16:48:01 -07:00
Daniel Hahler b88e09a697
Merge pull request #3548 from blueyed/fix-docs
tox: clean up docs target
2018-08-14 15:22:46 +02:00
Daniel Hahler dff7b203f7 tox: clean up docs target 2018-08-02 13:07:03 +02:00
Bruno Oliveira d461e931dd Use python 3.6 for regendoc 2018-07-30 20:12:52 +00:00
Bruno Oliveira ac9ceaacd8 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-07-15 11:54:14 -03:00
Bruno Oliveira a0b0c37feb Revamp the release script: drop invoke and use tox directly
Following the lead from tox, use a simple Python script instead of depending
on ``invoke``.

Other changes:

* Some colors using ``colorama``.
* Run ``pre-commit`` before the final commit to ensure everything is neatly
  formatted.
* Drop generating local tag: legacy from the time we used ``devpi`` as staging
  area, currently we no longer use it, and we should push a
  tag from the last HEAD of the PR always to ensure it is correct.
2018-07-14 11:35:37 -03:00
Anthony Sottile af0059079c Remove unused fix-lint tox environment 2018-07-08 17:05:01 -07:00
Ronny Pfannschmidt 581d49635e add docs and changelog 2018-06-27 06:52:36 +02:00
Ronny Pfannschmidt 0672bc633f enable pytester to run examples copied from the cwd 2018-06-26 22:48:33 +02:00
Ronny Pfannschmidt 89e0a3ec27 merge from master to features 2018-06-26 17:01:05 +02:00
Anthony Sottile cbaa7dd56a Upgrade pre-commit hooks except pyupgrade 2018-06-26 06:35:27 -07:00
Anthony Sottile 17985b893d Remove warning filter as well 2018-06-23 10:22:09 -07:00
Anthony Sottile 8e9f1d2417
Use --show-diff-on-failure for pre-commit CI invocation 2018-06-18 18:27:48 -07:00
Ronny Pfannschmidt c081c5ee23 add example scripts for issue #519 2018-06-15 18:04:24 +02:00
Bruno Oliveira 88ae21f2cc Add mock dependency to py27-nobyte 2018-06-12 18:07:40 -03:00
Ronny Pfannschmidt df17bb2bd3 switch linting tox env to use pre-commit, clean out travis linting env as unneeded 2018-05-24 14:17:09 +02:00
Bruno Oliveira f5361a302c Use a more recent hypothesis version on CI 2018-05-16 07:35:02 -03:00
Bruno Oliveira 888fcbc4b4 Simplify tox to avoid repetition
Also took the opportunity to:

* Use more cores for py*-xdist environments
* Update freeze test to use py36
2018-04-11 18:30:15 -03:00
Stefan Scherfke 9aa2a83785 Use correct spelling for "more-itertools" 2018-04-03 16:48:32 +02:00
Bruno Oliveira f3c87a77a7 Merge remote-tracking branch 'upstream/master' into release-3.5.0 2018-03-21 20:39:44 +00:00
Jeffrey Rackauckas a4cf380343 Fix tests to not fail when running from root. 2018-03-18 21:23:39 -07:00
Bruno Oliveira 1fff81e21d Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-03-16 18:15:28 -03:00
Bruno Oliveira e7bce90d29 Remove basepython from testenv:docs so it can be built with Python 3 2018-03-06 20:41:19 -03:00
Bruno Oliveira 6fa9768545 Use sphinxcontrib-trio extension
This adds some more capabilities to sphinx, like marking
functions as decorators or with contexts
2018-03-06 20:41:19 -03:00
Jeffrey Rackauckas e42fe5f0f9 Add doc to norecursedirs in tox.ini 2018-03-05 19:35:41 -08:00
Bruno Oliveira 93306f6a5e Merge remote-tracking branch 'upstream/master' into features 2018-01-09 18:41:00 -02:00
Bruno Oliveira 3dd24f8d21 Ignore ImportWarnings regarding package resolution
The problem is described/discussed in #3061

Ideally this should be a temporary solution until we find a proper one
which gets rid of the warning
2018-01-08 21:11:08 -02:00
Ronny Pfannschmidt afc607cfd8 move node base classes from main to nodes 2017-12-18 11:08:20 +01:00
Jurko Gospodnetić dd64f1a4a9 fix tox.ini comment typos 2017-12-09 13:34:57 +01:00
Bruno Oliveira 983a09a2d4 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2017-11-10 18:33:02 -02:00
Bruno Oliveira b11640c1eb Fix linting E722: do not use bare except 2017-11-04 13:59:10 -02:00
Bruno Oliveira 03829fde8a Fix linting E741: ambiguous variable name 2017-11-04 13:59:10 -02:00
Bruno Oliveira f3a119c06a Merge upstream/master into features 2017-11-03 16:37:18 -02:00
Bruno Oliveira c3ba9225ef Change directory for py27 xdist-related envs
The "filter_traceback" function was not filtering the frames
that belonged to the pytest internals.

"filter_traceback" was receiving *relative* paths when running with
xdist, and full paths in non-distributed runs; for this reason
the traceback function did not consider the received path to be
relative to the pytest internal modules.

Fix #2843
2017-10-26 21:34:41 -02:00
Bruno Oliveira 6821d36ca5 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2017-10-24 19:57:14 -02:00
Bruno Oliveira a3ec3df0c8 Add E722 and E741 flake errors to the ignore list
Also fixed 'E704 multiple statements on one line (def)' in python_api
2017-10-23 18:19:15 -02:00
Ronny Pfannschmidt 73ff53c742 remove eol python from the ci config 2017-10-09 16:36:41 +02:00
Ronny Pfannschmidt 88366b393c start the removal of python 2.6/3.3 support 2017-10-09 16:35:33 +02:00
Daniel Hahler 87596714bf minor: cleanup tox.ini 2017-09-27 00:45:10 +02:00
Bruno Oliveira 3ebfb881c9 Merge remote-tracking branch 'upstream/master' into features 2017-09-18 19:10:31 -03:00
Bruno Oliveira 9933635cf7 Change to py36 as main environment for Python 3 environments in tox
This also has the benefit of working around Travis recent failures
in Python 3.5 environments.
2017-09-16 19:18:07 -03:00
Bruno Oliveira d01f08e96f Merge branch 'features' into pluggy-master 2017-09-06 13:13:35 -03:00
Bruno Oliveira 10d43bd3bf Set xfail_strict=True in pytest's own test suite
Fix #2722
2017-09-05 19:57:26 -03:00
Bruno Oliveira f825b4979b Merge remote-tracking branch 'upstream/master' into features 2017-09-05 19:44:33 -03:00
Bruno Oliveira d9992558fc Refactor tox.ini so pluggymaster envs share definitions 2017-09-05 19:04:58 -03:00
Bruno Oliveira 9bbf14d0f6 Create explicit 'pluggymaster' env definitions
For some reason, the previous approach brakes 'coveralls' because
pip still tries to install the 'pluggy' master requirement
(git+https://...)
2017-09-01 20:40:14 -03:00
Bruno Oliveira c42d966a40 Change all pytest report options to the more concise '-ra' in tox.ini 2017-09-01 18:57:42 -03:00
Bruno Oliveira 11ec6aeafb Add test environment using pluggy from master branch
Fix #2737
2017-09-01 18:33:30 -03:00
Tyler Goodlet 756db2131f Drop vendoring from packaging 2017-08-24 16:53:24 -04:00
Bruno Oliveira 7b5d26c1a8 Use py36 as preferred Python 3 interpreter for CI testing 2017-08-14 20:27:28 -03:00
Bruno Oliveira 73c6122f35 Merge remote-tracking branch 'upstream/master' into features 2017-07-24 21:12:51 -03:00
Bruno Oliveira 0726d9a09f Turn warnings into errors in pytest's own test suite
Fix #2588
2017-07-22 21:44:18 -03:00
Kale Kundert 4c45bc9971
Add the numpy tests back into tox.ini
I'm not sure why they were removed...
2017-07-22 08:24:45 -07:00
Bruno Oliveira 22f54784c2 Add "fix-lint" tox environment to fix linting errors 2017-07-20 22:12:15 -03:00
Bruno Oliveira 26ee2355d9 Merge remote-tracking branch 'upstream/features' into fix-flake8-errors 2017-07-19 17:09:05 -03:00
Bruno Oliveira d7f182ac4f Remove SETUPTOOLS_SCM_PRETEND_VERSION during linting
It was needed because of check-manifest, but we no longer have a
MANIFEST file so it is not necessary
2017-07-19 10:02:13 -03:00
Bruno Oliveira 4fd92ef9ba Merge branch 'fix-flake8-issues' into features 2017-07-17 21:05:39 -03:00
Andras Tim b49e8baab3 Fixed E731 flake8 errors
do not assign a lambda expression, use a def
2017-07-17 01:44:23 +02:00
Andras Tim 15610289ac Fixed E712 flake8 errors
comparison to True should be ‘if cond is True:’ or ‘if cond:’
2017-07-17 01:44:23 +02:00
Andras Tim 5ae59279f4 Fixed E704 flake8 errors
multiple statements on one line (def)
2017-07-17 01:44:23 +02:00
Andras Tim bf259d3c93 Fixed E702 flake8 errors
multiple statements on one line (semicolon)
2017-07-17 01:44:23 +02:00
Andras Tim 85141a419f Fixed E701 flake8 errors
multiple statements on one line (colon)
2017-07-17 01:44:23 +02:00
Andras Tim 7d2ceb7872 Fixed E501 flake8 errors
line too long (> 120 characters)
2017-07-17 01:44:23 +02:00
Andras Tim b9e318866e Fixed E402 flake8 errors
module level import not at top of file
2017-07-17 01:44:23 +02:00
Andras Tim 45ac863069 Fixed E401 flake8 errors
multiple imports on one line
2017-07-17 01:44:23 +02:00
Andras Tim 7248b759e8 Fixed E303 flake8 errors
too many blank lines (3)
2017-07-17 01:44:23 +02:00
Andras Tim b840622819 Fixed E302 flake8 errors
expected 2 blank lines, found 0
2017-07-17 01:44:23 +02:00
Andras Tim 17a21d540b Fixed E301 flake8 errors
expected 1 blank line, found 0
2017-07-17 01:44:23 +02:00
Andras Tim 9bad9b53d8 Fixed E293 flake8 errors 2017-07-17 01:44:23 +02:00
Andras Tim 4730c6d99d Fixed E272 flake8 errors
multiple spaces before keyword
2017-07-17 01:44:23 +02:00
Andras Tim c9a081d1a3 Fixed E271 flake8 errors
multiple spaces after keyword
2017-07-17 01:44:22 +02:00
Andras Tim 195a816522 Fixed E265 flake8 errors
block comment should start with ‘# ‘
2017-07-17 01:44:22 +02:00
Andras Tim eae8b41b07 Fixed E262 flake8 errors
inline comment should start with ‘# ‘
2017-07-17 01:44:22 +02:00
Andras Tim 8f3eb6dfc7 Fixed E261 flake8 errors
at least two spaces before inline comment
2017-07-17 01:44:22 +02:00
Andras Tim b226454582 Fixed E251 flake8 errors
unexpected spaces around keyword / parameter equals
2017-07-17 01:44:22 +02:00
Andras Tim 4c24947785 Fixed E241 flake8 errors
multiple spaces after ‘,’
2017-07-17 01:44:22 +02:00
Andras Tim 617e510b6e Fixed E231 flake8 errors
missing whitespace after ‘,’, ‘;’, or ‘:’
2017-07-17 01:44:22 +02:00
Andras Tim 4b22f270a3 Fixed E226 flake8 errors
missing whitespace around arithmetic operator
2017-07-17 01:44:22 +02:00
Andras Tim 2e8caefcab Fixed E225 flake8 errors
missing whitespace around operator
2017-07-17 01:44:22 +02:00
Andras Tim 3fabc4d219 Fixed E222 flake8 errors
multiple spaces after operator
2017-07-17 01:44:22 +02:00
Andras Tim f640e0cb04 Fixed E221 flake8 errors
multiple spaces before operator
2017-07-17 01:44:22 +02:00
Andras Tim ebb6d0650b Fixed E203 flake8 errors
whitespace before ‘:’
2017-07-17 01:44:22 +02:00
Andras Tim ba0a4d0b2e Fixed E202 flake8 errors
whitespace before ‘)’
2017-07-17 01:28:17 +02:00
Andras Tim 1ff54ba205 Fixed E201 flake8 errors
whitespace after ‘(‘
2017-07-17 01:28:17 +02:00
Andras Tim df54bf0db5 Fixed E131 flake8 errors
continuation line unaligned for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim 1c935db571 Fixed E129 flake8 errors
visually indented line with same indent as next logical line
2017-07-17 01:28:16 +02:00
Andras Tim cf97159009 Fixed E128 flake8 errors
continuation line under-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim 57438f3efe Fixed E127 flake8 errors
continuation line over-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim e855a79dd4 Fixed E126 flake8 errors
continuation line over-indented for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim 92e2cd9c68 Fixed E125 flake8 errors
continuation line with same indent as next logical line
2017-07-17 01:28:16 +02:00
Andras Tim 051d76a63f Fixed E124 flake8 errors
closing bracket does not match visual indentation
2017-07-17 01:28:16 +02:00
Andras Tim 4b20b9d8d9 Fixed E123 flake8 errors
closing bracket does not match indentation of opening bracket’s line
2017-07-17 01:28:16 +02:00
Andras Tim 425665cf25 Fixed E122 flake8 errors
continuation line missing indentation or outdented
2017-07-17 01:28:16 +02:00
Andras Tim 0be97624b7 Fixed E121 flake8 errors
continuation line under-indented for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim 64a4b9058c Fixed E113 flake8 errors
unexpected indentation
2017-07-17 01:28:16 +02:00
Andras Tim 8de49e8742 Fixed E111 flake8 errors
indentation is not a multiple of four
2017-07-17 01:28:16 +02:00
Andras Tim 6146ac97d9 Fixed E101 flake8 errors
indentation contains mixed spaces and tabs
2017-07-17 01:28:16 +02:00
Andras Tim 6af2abdb53 Fixed flake8 warnings
W191 indentation contains tabs
W292 no newline at end of file
W293 blank line contains whitespace
W391 blank line at end of file
2017-07-17 01:28:16 +02:00