Commit Graph

12725 Commits

Author SHA1 Message Date
Bruno Oliveira 70764bef4f Merge pull request #7550 from pytest-dev/release-6.0.0 2020-07-28 17:01:27 -03:00
Bruno Oliveira 38029828d1
Support generating major releases using issue comments (#7548) 2020-07-28 13:40:14 +02:00
Anthony Sottile c2c0b7a542
Merge pull request #7545 from asottile/pylib_in_docs
remove usage of pylib in docs
2020-07-27 09:36:58 -07:00
Anthony Sottile 9818899df4 remove usage of pylib in docs 2020-07-26 17:57:25 -07:00
Zac Hatfield-Dodds 3a060b77e8
Revert change to traceback repr (#7535)
* Revert change to traceback repr

* Add test and changelog entry

* Restore *exact* prev output

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-24 13:30:38 +02:00
Bruno Oliveira 7ec6401ffa
Change pytest deprecation warnings into errors for 6.0 release (#7362)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-07-22 21:36:51 -03:00
Bruno Oliveira a9799f0b35
Merge pull request #7531 from bluetech/changelog-mypy-version
doc: mention mypy<0.750 doesn't work in typing changelog
2020-07-22 16:21:11 -03:00
Ran Benita 102360b490
Merge pull request #7519 from hroncok/pytest_warning_captured_deprecated
List pytest_warning_captured in deprecated things for 6.0.0rc1
2020-07-22 20:50:52 +03:00
Ran Benita 1a18dfd651 doc: mention mypy<0.750 doesn't work in typing changelog 2020-07-22 20:48:24 +03:00
Bruno Oliveira 2a8dcc9728
Merge pull request #7526 from bluetech/win-bash-2
testing: improve bash check
2020-07-21 23:02:05 -03:00
Kelton Bassingthwaite dbc50a7061
Clarify usage of usefixtures mark in hooks
Fix #7512

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-21 23:00:47 -03:00
Ran Benita 0709305953 testing: improve bash check 2020-07-21 21:21:09 +03:00
Anthony Sottile 6ecb8f53d0
Merge pull request #7521 from asottile/newlines_unaffected
Preserve newlines when captured with capfd
2020-07-20 11:48:08 -07:00
Ran Benita 2294f109b6
Merge pull request #7522 from garrettthomaskth/patch-1
Fix "A xfail" typo
2020-07-20 21:43:35 +03:00
Anthony Sottile 8616a5f1d9 Preserve newlines when captured with capfd 2020-07-20 10:31:20 -07:00
Garrett Thomas 3ed05ee4d6
Fix typo
Change from "A xfail" to "An xfail"
2020-07-20 18:16:13 +02:00
Ran Benita 41d211c24a
testing: use a tighter check if `bash` is available (#7520)
This fixes CI on Windows since GitHub Actions started installing WSL on
their images which apparently installs some wrapper `bash` which does
not run actual bash.
2020-07-20 16:24:39 +02:00
Kostis Anagnostopoulos 07ed197247
doc: note about mutation of parametrized values (#7516)
Fix #7514 by augmenting Note with behaviour when parametrized values are mutated
(changes are reflected in subsequent test-case calls).
2020-07-20 15:12:48 +03:00
Miro Hrončok fbeb36226f List pytest_warning_captured in deprecated things for 6.0.0rc1 2020-07-20 13:41:28 +02:00
Ran Benita efcba7759e
Merge pull request #7515 from mdebi/issue_7441
docs: Add a note about -q option used in getting started guide
2020-07-20 10:09:16 +03:00
Debi Mishra 25b56e9c69 docs: Add a note about -q option used in getting started guide 2020-07-20 01:28:11 +05:30
Ran Benita 8783e65f8d
Merge pull request #7509 from bluetech/sphinx3
docs: support Sphinx>=3.1 and require it
2020-07-18 12:38:26 +03:00
Ran Benita 65b014a117 docs: support Sphinx>=3.1 and require it
Previously was restricted to >=1.8.2,<2.1, but newer versions have some
nice improvements I'd like to be able to use in upcoming changes.

Changelog: https://www.sphinx-doc.org/en/master/changes.html#release-3-1-0-released-jun-08-2020

There are two issues that came up:

1. `highlightlang` is deprecated for `highlight`.

2. Doesn't like having two `automethod` generated for the same
   `Metafunc.parametrize` method. Gives this warning:

   `pytest/doc/en/reference.rst:846: WARNING: duplicate object description of _pytest.python.Metafunc.parametrize, other instance in reference, use :noindex: for one of them`

   To work around this I make `pytest.mark.parametrize` link to
   `Metafunc.parametrize` instead of repeating it.
2020-07-17 23:17:11 +03:00
Lewis Cowles 71ab6236a1
Clearer guidance on pytest.raise(match=...) failure (#7499) 2020-07-15 22:26:47 +03:00
Bruno Oliveira 9c2c5d9f05
Merge pull request #7501 from nicoddemus/doctest-fixtures
Clarify 'getfixture' needs to access fixtures by normal means
2020-07-15 09:30:13 -03:00
Bruno Oliveira e7c42ae62b
Inaccessible lock files now imply temporary directories can't be removed
Fix #7500

Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-07-15 09:25:17 -03:00
Ran Benita 41c40efe80
Merge pull request #7496 from bluetech/typing-idfn
Fix typing of params ids callable form
2020-07-15 10:25:46 +03:00
Ran Benita fe1fcfd081
Merge pull request #7490 from bluetech/fix-dynamic-runtest-xfail
skipping: fix dynamic xfail mark added in runtest not respected
2020-07-15 10:25:29 +03:00
Bruno Oliveira 97f560d4d1 Clarify 'getfixture' needs to access fixtures by normal means
Related to #7497
2020-07-14 20:21:57 -03:00
Ran Benita bc17034a67 Fix typing of params ids callable form
The previous typing had an object passed to the user, which they can't
do anything with without asserting, which is inconvenient. Change it to
Any instead.

Note that what comes *back* to pytest (the return value) should be an
`object`, because we want to handle arbitrary objects without assuming
anything about them.
2020-07-14 14:53:42 +03:00
Ran Benita 91f6892e6a testing: add a file for checking no mypy errors
We probably something a bit more elaborate in the future but for now
it's something to verify fixes and catch regressions.
2020-07-14 14:37:59 +03:00
Anthony Sottile 358150c30e
Merge pull request #7492 from bluetech/xfail-mark-typing-fix
mark: fix typing for `@pytest.mark.xfail(raises=...)`
2020-07-13 16:46:35 -07:00
Ran Benita 1a73e78698 mark: fix typing for `@pytest.mark.xfail(raises=...)` 2020-07-14 01:39:04 +03:00
Ran Benita ccad10a829 skipping: fix dynamic xfail mark added in runtest not respected
If a test runtest phase (not setup) dynamically adds a pytest.mark.xfail
mark to the item, it should be respected, but it wasn't. This regressed
in 3e6fe92b7e (not released).

Fix it by just always refreshing the mark if needed. This is mostly what
was done before but in a more roundabout way.
2020-07-14 01:02:06 +03:00
Ran Benita 78f2dc08fa skipping: slight simplification 2020-07-14 00:45:12 +03:00
Bruno Oliveira 7f7a36478a
Merge pull request #7482 from nicoddemus/changelog-adjustments
Small fixes/updates to the 6.0.0rc1 CHANGELOG
2020-07-13 15:11:47 -03:00
Bruno Oliveira 07f5f6fd4a
Merge pull request #7481 from bluetech/tw-unicode-escape
terminalwriter: bring back handling of printing characters not supported by stdout
2020-07-11 16:01:45 -03:00
Bruno Oliveira 789654dfe2 Small fixes/updates to the 6.0.0rc1 CHANGELOG
- Grammar fixes
- Moved a few sections from Features to Improvements
- Used internal doc links when appropriate
2020-07-11 15:41:10 -03:00
Simon K 7f467ebc9a
Create subdirectories if they do not exist when specified for log file (#7468)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-11 13:40:28 -03:00
Ran Benita 7b65b2337b
Merge pull request #7472 from bluetech/cleanups-4
Some minor fixes & type annotations
2020-07-11 19:05:07 +03:00
Ran Benita 113339b029 terminalwriter: bring back handling of printing characters not supported by stdout 2020-07-11 18:59:00 +03:00
Bruno Oliveira d466cc25a7
Merge pull request #7424 from nicoddemus/package-scope-experimental-7389
Remove package scope experimental status
2020-07-11 08:44:34 -03:00
Bruno Oliveira 0b58f73d44
Merge pull request #7476 from bluetech/pylint-callable
mark/structure: fix pylint complaining that builtin marks are not callable
2020-07-10 17:26:37 -03:00
Bruno Oliveira cf648d9cad
Merge pull request #7474 from nicoddemus/env-vars-docs 2020-07-10 17:20:06 -03:00
Ran Benita c1ca42b5c2 mark/structure: fix pylint complaining that builtin marks are not callable 2020-07-10 23:10:17 +03:00
Bruno Oliveira 906d8496c9 New doc role: globalvar for special variables
This introduces a new role, `:globalvar:`, so we can mark/reference
variables like `pytest_plugins`, `pytestmark`, etc. This besides being useful
also makes the documentation look more consistent.
2020-07-10 09:50:03 -03:00
Bruno Oliveira 1667d138aa Use sphinx references for NO_COLOR and FORCE_COLOR in changelog 2020-07-10 09:30:04 -03:00
Hugo van Kemenade c1c5a2b34a
Add support for NO_COLOR and FORCE_COLOR (#7466)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-10 08:49:10 -03:00
Ran Benita 7934ac280f Add changelog entry for Frame removals 2020-07-10 13:08:56 +03:00
Ran Benita c8676002a7 code/code: remove redundant __ne__ implementation
This implementation is the default when __eq__ is implemented.
2020-07-10 13:08:56 +03:00