Commit Graph

11961 Commits

Author SHA1 Message Date
Daniel Hahler 4630e2725e Use `TYPE_CHECKING` instead of `False`
This allows for e.g. Jedi to infer types (it checks the name).

It was only used to support Python 3.5.0/3.5.1, where this is is not
available in the `typing` module.

Ref: https://github.com/davidhalter/jedi/issues/1472

Uses `TYPE_CHECKING = False` in `_pytest.outcomes` to avoid having to
work around circular import.
2020-01-16 16:11:39 +01:00
Daniel Hahler ea31649062 ci: github actions: only deploy pytest-dev/pytest 2020-01-16 13:57:46 +01:00
Bruno Oliveira 3789bb53a7
junit_logging options (follow up to #6469) (#6473)
junit_logging options (follow up to #6469)
2020-01-16 08:13:48 -03:00
Bruno Oliveira 9298f7e4a9 Improve CHANGELOG and docs for junit_logging 2020-01-16 07:47:00 -03:00
Bruno Oliveira 715f56dfbc
Fixtures now register finalizers with all fixtures before them… (#6438)
Fixtures now register finalizers with all fixtures before them in the stack
2020-01-16 07:33:55 -03:00
Jakub Mitoraj ab6406b42e Update junit_logging with no,log,system-out,system-err,out-err,all 2020-01-16 08:14:46 +01:00
Chris NeJame 99180939fe fixtures register finalizers with all fixtures before them in the stack 2020-01-15 11:00:42 -05:00
Bruno Oliveira 1ec5befdb7
Merge pull request #6468 from nicoddemus/deploy-release-notes-6369
Add deploy step: publish package and release notes
2020-01-15 09:05:23 -03:00
Ronny Pfannschmidt 8ba0b7bc2a fix #6341 - disallow session/config in Node.from_parent 2020-01-15 13:00:46 +01:00
Bruno Oliveira 1d3f27cef0 Add deploy step: publish package and release notes
Fix #6369
2020-01-15 08:11:35 -03:00
Daniel Hahler 29703a5f51
Merge pull request #6466 from blueyed/cover-safe_getattr
tests: cover safe_getattr
2020-01-15 11:20:42 +01:00
Daniel Hahler 6f7a95c32e tests: cover safe_getattr 2020-01-15 11:20:00 +01:00
Daniel Hahler bebfd28da3 doc: revisit section about rootdir
Ref: https://github.com/pytest-dev/pytest/issues/6376
2020-01-15 09:43:35 +01:00
Daniel Hahler f5844449a8
Merge pull request #6442 from blueyed/rP
terminal: summary_passes: handle teardown sections
2020-01-15 03:02:09 +01:00
Bruno Oliveira f2659f77be
Merge master into features (#6458)
Merge master into features
2020-01-14 20:06:51 -03:00
Bruno Oliveira b9c136b809 Use a dummy RemoteTraceback for test in Python 3.5 Windows
Somehow in Python 3.5 on Windows this test fails with:
   File "c:\hostedtoolcache\windows\python\3.5.4\x64\Lib\multiprocessing\connection.py", line 302, in _recv_bytes
     overlapped=True)
OSError: [WinError 6] The handle is invalid

This only happens in this platform and Python version, decided to use
a dummy traceback as originally done in #6412.
2020-01-14 18:31:21 -03:00
Pauli Virtanen fd1691a2b3 Make --showlocals work together with --tb=short
Enable showing local variables when asked to do so in the short
traceback mode.

Fixes #494
2020-01-14 21:30:58 +02:00
Daniel Hahler 4a265ba38b
Merge pull request #6446 from blueyed/tox-mypy
tox: add mypy toxenv
2020-01-14 18:26:35 +01:00
Daniel Hahler 910d5df6a8
Merge pull request #6456 from blueyed/fix-doc-_splitnode
minor: fix doc/example for _pytest.nodes._splitnode
2020-01-14 15:22:01 +01:00
Bruno Oliveira 21d189eb52 Enable GitHub actions for 'features' 2020-01-14 09:18:34 -03:00
Bruno Oliveira e9d9f71374 Merge remote-tracking branch 'upstream/master' into mm 2020-01-14 09:17:52 -03:00
Bruno Oliveira 00adb4e42f
Implement code coverage in GitHub actions (#6441)
Implement code coverage in GitHub actions
2020-01-14 09:14:57 -03:00
Daniel Hahler b2cb87fae6
Merge pull request #6440 from blueyed/py351
ci: Travis: Python 3.5.1 via Trusty
2020-01-14 12:41:16 +01:00
Daniel Hahler 189fe3ba1d minor: fix doc/example for _pytest.nodes._splitnode 2020-01-14 12:40:36 +01:00
Bruno Oliveira d291905825 Append token to codecov.yml instead of duplicating the file 2020-01-14 07:47:21 -03:00
Daniel Hahler f0c7f21312 Remove "pragma: no cover" comments 2020-01-14 09:15:36 +01:00
Daniel Hahler 4ff7453b48 ci: Travis: Python 3.5.1 via Trusty
Python 3.5.0 caused flaky failures before
(https://github.com/pytest-dev/pytest/issues/5795).

This is pulled out of https://github.com/pytest-dev/pytest/pull/6435,
which adds code specific for Python < 3.5.2.

It only runs a specific test, while collecting everything to get
coverage of the version specific code around typing.
2020-01-14 09:15:36 +01:00
Daniel Hahler 0e70acab79 tox: add mypy toxenv
This is different from what pre-commit (in "linting") runs in that it
uses stubs from (test) dependencies.

It would make sense to run this on CI additionally (since there is no
"pre-commit --skip mypy", and a separate config is not worth it).
But currently it triggers a false positive though anyway
(https://github.com/erikrose/more-itertools/pull/374).
2020-01-14 08:59:48 +01:00
Daniel Hahler 8eec42f040
Merge pull request #6455 from blueyed/mypy-master
master: update mypy 0.740 -> 0.761
2020-01-14 08:56:51 +01:00
Daniel Hahler 3adaa3d87b
Merge pull request #6447 from blueyed/fix-determine_setup
typing: fix _pytest.config.findpaths.determine_setup
2020-01-14 08:56:28 +01:00
Ran Benita 090e260517 master: update mypy 0.740 -> 0.761
(cherry picked from commit 16ff9f591e)
(cherry picked from commit 4848bbdf9a)
2020-01-14 06:31:41 +01:00
Daniel Hahler 117072d64c typing: fix _pytest.config.findpaths.determine_setup 2020-01-13 11:45:20 +01:00
Daniel Hahler 90740007a8
Merge pull request #6445 from blueyed/tox-pre-commit-posargs
tox: linting: pass posargs
2020-01-12 21:17:14 +01:00
Daniel Hahler 5e1c6ce630 tox: linting: pass posargs 2020-01-12 20:09:51 +01:00
Daniel Hahler a136111dcc tests: test_xfail_handling: use sys.dont_write_bytecode 2020-01-11 23:05:12 +01:00
Daniel Hahler 61d04d3084 terminal: summary_passes: handle teardown sections
Fixes https://github.com/pytest-dev/pytest/issues/2780.
2020-01-11 21:58:19 +01:00
Bruno Oliveira a3bc6df950 Implement code coverage in GitHub actions
This overwrites the `codecov.yml` file in the root of the repository with
`codecov-upstream.yml` file (which contains the code-cov token)´, so PRs
and branches on the repository can upload coverage.

Suggestion from here:

https://github.com/pytest-dev/pytest/pull/6421#issuecomment-571934112

Security concerns: the token might be misused, but only to upload bogus coverage
to `codecov.io`, so the team believe this is harmless. If we decide to fallback
from this decision , we just need to revoke the token.

Related to #6369
2020-01-11 12:21:20 -03:00
Daniel Hahler 2d488f7615
Merge pull request #6432 from blueyed/merge-master-into-features
Merge master into features
2020-01-10 14:44:30 +01:00
Daniel Hahler 1356d20e90 Merge master into features 2020-01-10 05:20:41 +01:00
Bruno Oliveira 622995a501
Fix grammar in README (#6427)
Fix grammar in README
2020-01-09 20:22:05 -03:00
Daniel Hahler 1e28cb855d
Merge pull request #6425 from blueyed/xfail-yellow
terminal: use "yellow" with any "xpassed" tests
2020-01-09 23:22:58 +01:00
Ryan Barner 36531599a4
Fix grammar in README
Corrects grammar error in "Support pytest" section.
2020-01-09 14:12:57 -08:00
Bruno Oliveira 29db2da9a7
tmpdir_factory.mktemp now fails given absolute and non-normaliz… (#6323)
tmpdir_factory.mktemp now fails given absolute and non-normalized paths.
2020-01-09 19:10:03 -03:00
Bruno Oliveira 24f8002de8
Fix wrong 'changelog' and 'reference' links in docs (#6424)
Fix wrong 'changelog' and 'reference' links in docs
2020-01-09 19:09:35 -03:00
Bruno Oliveira 5b295ec68e Merge remote-tracking branch 'upstream/features' into gftea/features 2020-01-09 18:41:47 -03:00
Bruno Oliveira fa645a7003 Improve docstrings for mktemp 2020-01-09 18:20:46 -03:00
Daniel Hahler 13baab746d terminal: use "yellow" with any "xpassed" tests
Closes https://github.com/pytest-dev/pytest/issues/449.
2020-01-09 22:20:41 +01:00
Daniel Hahler 9f1ade9acf
Merge pull request #6411 from blueyed/cacheprovider-copy-items
cacheprovider: pytest_collection_modifyitems: copy items
2020-01-09 22:07:20 +01:00
Bruno Oliveira 23475b6ab9 Fix wrong 'changelog' and 'reference' links in docs
Both references were referencing links from Python because of our intersphinx
mapping in `conf.py`:

    intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

Because Python's docs explicitly define both references, Sphinx fallbacks to
them instead of generating implicit references as was expected.

Fix #6397
2020-01-09 18:06:15 -03:00
Daniel Hahler 2d2c67d7c0 cacheprovider: pytest_collection_modifyitems: copy items 2020-01-09 21:48:54 +01:00