Commit Graph

1888 Commits

Author SHA1 Message Date
Tobias Schmidt 90ee8a7599
docfix 2020-03-12 09:38:00 +01:00
Ronny Pfannschmidt 378a75ddf6 run and fix tox -e regen to prepare 5.4
* no longer trigger deprecation warnings when looking up fixtures
* fix missed imports in a test example
2020-03-11 22:25:51 +01:00
Ronny Pfannschmidt 09b289e286 fix mozilla qa project link 2020-03-11 11:10:33 +01:00
Ronny Pfannschmidt 694dbe5bd4 fix pydanny.com url to the one with ssl set up 2020-03-11 10:52:16 +01:00
Daniel Hahler e3cf4fc258
doc/en/Makefile: use Sphinx's make mode (#6873)
Syncs it from the output of current sphinx-quickstart.
2020-03-07 23:45:05 +01:00
Daniel Hahler 9e8540f25f
docs: remove doc/en/links.inc (#6853) 2020-03-06 03:11:24 +01:00
Daniel Hahler 3865f77de3 doc: TestReport: :show-inheritance: 2020-03-05 06:00:11 +01:00
Daniel Hahler a1ad6e3117 doc: fix/revisit _Result (hook wrappers)
- it should not document the deprecated `result`; used the same as
  pluggy documents itself
- add a "hookwrapper" label, that could be used by pluggy (currently it
  links to the section)
- use pluggy's `hookwrappers` label for linking to its documentation
2020-03-05 05:55:04 +01:00
Daniel Hahler 9b32794391 intersphinx_mapping: add pluggy 2020-03-05 05:53:42 +01:00
Daniel Hahler 77adb33ec6 doc: use show-inheritance with warnings, revisit docstrings
Revisits the docstring for `PytestExperimentalApiWarning` and
`PytestUnhandledCoroutineWarning`.
2020-03-05 02:56:18 +01:00
Bruno Oliveira d161bedcee Add an example of how to port the code 2020-03-04 09:23:31 -03:00
Daniel Hahler bd7e33277b
docs: remove tracking through Google Analytics (#6843)
This might not even be monitored by anyone, but if it is useful in
general should probably get replaced with a less controversial provider.
2020-03-03 01:35:14 +01:00
Daniel Hahler 620d457756 doc: add __tracebackhide__ label 2020-03-02 17:08:37 +01:00
Ronny Pfannschmidt 3637d9eb3f followup: add note on from_parent kwargs 2020-03-01 20:34:38 +01:00
Ronny Pfannschmidt 5c1e56d350 docs: from_parent - add minimal before/after example
fixup: fix from_parent version
2020-03-01 20:34:38 +01:00
Bruno Oliveira ff7b5dbbde
Merge pull request #6784 from nicoddemus/deprecate-terminal-writer
Deprecate TerminalReporter.writer
2020-02-28 21:07:02 -03:00
Daniel Hahler f77d606d4e
docs: generate index and add it to globaltoc sidebar (#6808) 2020-02-27 00:34:18 +01:00
Daniel Hahler 2e48c32dea
docs: fix reference to config.cache fixture (#6807) 2020-02-26 01:24:18 +01:00
Stefano Mazzucco 2451716746
Remove reference to old konira plugin from docs (#6819)
The pytest-konira plugin has not seen an update since 2011, moreover
the "project description" on PyPI points to a dubious website that
does not actually correspond to the project and instead redirects to
advertising content.
2020-02-26 01:19:40 +01:00
kpinc eeebcd77dd
doc: add list of fixtures to start of fixture chapter (#6696)
- Add list of fixtures to start of fixture chapter
- Add "fixture" cross ref type
2020-02-22 14:56:19 +01:00
TWood67 b26e60c2da
updated documentation
added a default value so a runtime exception does not occur
2020-02-21 11:45:24 -06:00
Bruno Oliveira 435ad221f9 Deprecate TerminalReporter.writer
Fix #6779
2020-02-20 21:04:49 -03:00
Nathaniel Compton 7c09d88b72
#6289: Add new example to XFAIL documentation (#6685)
Fix #6289

Co-authored-by: Ran Benita <ran234@gmail.com>
2020-02-19 15:04:37 -03:00
Daniel Hahler d18c75baa3
doc: fix test with link to `python_files` (#6741)
Follow-up to b09762d (#6705).

Ref: https://github.com/pytest-dev/pytest/pull/6705#discussion_r379819573
2020-02-16 10:30:25 +01:00
kpinc 9785ee438d
doc: expand first sentence on fixtures into a paragraph (#6742) 2020-02-15 18:35:36 +01:00
Daniel Hahler b09762df27
doc: link to `python_files` from "Assertion Rewriting" (#6705)
Ref: https://github.com/pytest-dev/pytest/issues/6377
Ref: https://github.com/blueyed/pytest/pull/145
2020-02-15 00:32:16 +01:00
Bruno Oliveira e6ea9edffe
Merge pull request #6673 from sscherfke/features
Reverse / fix meaning of "+/-" in error diffs
2020-02-12 15:05:38 -03:00
Ran Benita c9f9664336 Merge branch 'features' into master
The features branch is no more. Development of features is now also done
on master.

See https://github.com/pytest-dev/pytest/pull/6571.
2020-02-12 13:50:02 +02:00
Ran Benita c3e53a072d Switch to new git workflow
Co-Authored-By: Daniel Hahler <git@thequod.de>
2020-02-12 09:49:21 +02:00
Bruno Oliveira 78baa7b575 Merge remote-tracking branch 'upstream/master' into mm
Conflicts:
	src/_pytest/main.py
	src/_pytest/mark/structures.py
	src/_pytest/python.py
	testing/test_main.py
	testing/test_parseopt.py
2020-02-11 19:22:28 -03:00
Ran Benita d33da078a8 Move ExitCode's definition from _pytest.main to _pytest.config
ExitCode is used in several internal modules and hooks and so with type
annotations added, needs to be imported a lot.

_pytest.main, being the entry point, generally sits at the top of the
import tree.

So, it's not great to have ExitCode defined in _pytest.main, because it
will cause a lot of import cycles once type annotations are added (in
fact there is already one, which this change removes).

Move it to _pytest.config instead.

_pytest.main still imports ExitCode, so importing from there still
works, although external users should really be importing from `pytest`.
2020-02-10 23:55:06 +02:00
Stefan Scherfke d59adc61f9 Reverse / fix meaning of "+/-" in error diffs
The convention is "assert result is expected".  Pytest's error diffs now
reflect this. "-" means that sth. expected is missing in the result and
"+" means that there are unexpected extras in the result.

Fixes: #3333
2020-02-10 21:12:37 +01:00
Vladyslav Rachek 9e262038c8
[parametrize] enforce explicit argnames declaration (#6330)
Every argname used in `parametrize` either must
be declared explicitly in the python test function, or via
`indirect` list

Fix #5712
2020-02-06 20:20:25 -03:00
rebecca-palmer c55bf23cbe
doc: s/pytest_mark/pytestmark (#6661) 2020-02-03 08:56:37 +01:00
Hugo van Kemenade c9eeafade5
Fix favicon for Chrome and Opera (#6639)
* Fix favicon for Chrome and Opera

* Delete pytest1favi.ico

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-01-31 20:56:45 -03:00
Ran Benita a435faad5c Merge branch 'master' into master-to-features 2020-01-31 11:27:06 +02:00
Hugo van Kemenade 55bffb7c15
Fix typo 2020-01-30 18:30:51 +02:00
Daniel Arndt d91459fc75 Reword fixture docs for clarity 2020-01-30 09:32:54 -04:00
Daniel Hahler b5b6e051ed Merge master into features 2020-01-30 02:29:02 +01:00
Daniel Hahler d478e2bbca doc: release-5.3.4
(cherry picked from commit fd1a51a23fa687cf344f3506dff6cde0166faf2c)
2020-01-29 18:28:11 +01:00
Bruno Oliveira 8c41236c66
doc: getting-started.rst: mention "Test" prefix for classes (#6583)
doc: getting-started.rst: mention "Test" prefix for classes
2020-01-29 12:49:49 -03:00
sdementen d848a20563 Extend the incremental marker for parametrize
The incremental marker is adapted to handle properly test classes with parametrize defined at class level.

Fix #3125
2020-01-29 08:25:17 -03:00
Daniel Hahler ddaa5d88ac terminal: default to `fE` with `-r` (reportchars)
Adds handling of `N` to reset `reportchars`, which can be used to get
the old behavior (`-rN`), and also allows for an alternative to
`--disable-warnings` (https://github.com/pytest-dev/pytest/issues/5066),
since `w` was included by default (without `--disable-warnings`).

Fixes https://github.com/pytest-dev/pytest/issues/6454
2020-01-29 00:33:15 +01:00
ParetoLife cbad319736
Update getting-started.rst
From the description it seemed to me as if just prefixing your methods with ``test_`` was enough, but you also need to prefix your class with ``Test``. Of course, in the reference material this is clearly stated, but I think it makes sense to mention it here as well, since you also mention the part about the methods' prefix.
2020-01-27 10:50:05 +01:00
Daniel Hahler 09bdbffbde Merge master into features
Conflicts:
	src/_pytest/_code/code.py
	src/_pytest/main.py
2020-01-24 23:44:50 +01:00
Daniel Hahler 040a61e22c
Merge pull request #6550 from blueyed/doc-cleandir-cd-back
doc/en/fixture.rst: chdir back to previous directory
2020-01-24 23:41:08 +01:00
Daniel Hahler cdd6f86e43 bug-fix fixes 2020-01-23 20:34:21 +01:00
Daniel Hahler 83451b548f doc/en/fixture.rst: chdir back to previous directory
This is considered to be best practice, and should be used in docs
therefore.
2020-01-23 19:09:18 +01:00
Daniel Hahler b63cb18776 doc: remove costlysetup example
It is not included with docs, and
`example/costlysetup/sub_a/test_quick.py::test_quick` sleeps for 5s,
slowing down `doctesting` unnecessarily.
2020-01-23 12:23:30 +01:00
Bruno Oliveira 93b74d28d2 Merge remote-tracking branch 'upstream/master' into mm
Conflicts:
 * 	src/_pytest/_code/code.py
 * 	src/_pytest/main.py
 * 	testing/python/metafunc.py
 * 	testing/test_parseopt.py
 * 	testing/test_pytester.py
2020-01-22 11:03:45 -03:00
Bruno Oliveira 6a26ac4125 Preparing release version 5.3.4 2020-01-20 13:53:31 -03:00
Bruno Oliveira 544b4a14d5
Fix Hugo van Kemenade name in release announcement
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-01-17 07:18:57 -03:00
Bruno Oliveira 56dc301c50 Preparing release version 5.3.3 2020-01-16 18:55:41 -05:00
Bruno Oliveira aa05334984 Remove broken link for user @jgsonesen 2020-01-16 18:51:33 -05:00
Daniel Hahler 5b0e255e85
Merge pull request #6465 from blueyed/doc-rootdir
doc: revisit section about rootdir
2020-01-16 21:55:12 +01:00
Daniel Hahler 83813bf515 Merge master into features
Conflicts:
	.github/workflows/main.yml
2020-01-16 19:45:52 +01:00
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
Bruno Oliveira 9298f7e4a9 Improve CHANGELOG and docs for junit_logging 2020-01-16 07:47:00 -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
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 1356d20e90 Merge master into features 2020-01-10 05:20:41 +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
Anthony Sottile 26a2e1aba7
Merge pull request #6401 from nicoddemus/4.6-maintenance-docs-onward
Update py27/py34 deprecation docs
2020-01-04 16:24:56 -05:00
Anthony Sottile 75f964c08d Merge pull request #6391 from asottile/release-4.6.9
Preparing release version 4.6.9
2020-01-04 13:01:46 -08:00
Bruno Oliveira 4fa819e535 Update py27/py34 deprecation docs
I've updated the text and incorporated the topics from #5275, so this
can now be part of the official docs, and #5275 can be closed/unpinned.

Closes #5275
2020-01-04 17:52:02 -03:00
Bruno Oliveira deb4287d1c Update copyright year to 2020
Merge pull request #6392 from hugovk/4.6-maintenance-2020
2020-01-04 08:46:58 -03:00
Adam Johnson 73702ca88b Improve warnings docs
* Rearrange section about context manager to be in order
* Link to `pytest.warns` and `recwarn` since a reader going top to bottom won't have seen about those yet.
* Used only context manager form in the example; the call form is somewhat obsolete
  and is mentioned in the reference docs already.
* Reuse the 'myfunction' from first example on the second one

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2019-12-26 19:16:19 -03:00
Bruno Oliveira a9608d54e0 Switch the order of the commands back and update the text
As suggested during review
2019-12-26 08:19:11 -03:00
Anthony Sottile 6cd61390c2 Improve docs so regen doesn't leak temp directories 2019-12-20 13:18:49 -08:00
Anthony Sottile ab44d3d733 Merge pull request #6360 from asottile/release-4.6.8
Preparing release version 4.6.8
2019-12-19 16:01:04 -08:00
captainCapitalism ed57b8e08a
invocation in last section 'pythonpath.rst' title swapped
The order of invocations 'python -m pytest' and 'pytest' are different in the header and the explanation. Me being lazy reading about the behaviour of 'former' looked up quickly the title and rushed to implementation to discover it actually works the other way - as stated in the documentation. So I propose to switch the order in the title to achieve consistent ordering and not confusing somebody like me again! :)
2019-12-19 11:35:52 +01:00
marc 536177bb56 fix typos in docs 2019-12-19 10:35:15 +01:00
Bruno Oliveira 75493f78bf
Merge master into features (#6346)
Merge master into features
2019-12-16 21:57:26 -03:00
Bruno Oliveira c487cf9dd5
Deprecate no print logs (#6333)
Deprecate no print logs
2019-12-16 19:01:16 -03:00
Vinay Calastry afbaee7649 Deprecate --no-print-logs option 2019-12-14 16:46:30 -08:00
Bruno Oliveira 853889e5db Merge remote-tracking branch 'upstream/master' into mm 2019-12-14 10:45:44 -03:00
Bruno Oliveira 7f24cc2feb
Remove duplicated user from announcement 2019-12-14 10:06:59 -03:00
Bruno Oliveira 10fcac7f90 Preparing release version 5.3.2 2019-12-13 08:51:15 -03:00
Bruno Oliveira cbb2f9541b
Merge pull request #6316 from cb109/make-keyword-expression-matching-case-insensitive
Make keyword expression matching case-insensitive
2019-12-12 06:47:59 -03:00
cmachalo e13ad22364 Include new --capture-mode=tee-sys option
Fix #4597
2019-12-09 13:05:23 -03:00
Michael Rose 2ddc330b62 Fixes #6326: Typo in the Security section docs home page. 2019-12-08 22:26:53 -05:00
Ronny Pfannschmidt 3812985ed4 update backward compatibility policy to allow for breakage
Co-Authored-By: Anthony Sottile <asottile@umich.edu>
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2019-12-07 18:59:21 +01:00
Bruno Oliveira 64c71daa21 Add 4.6.7 changelog to master 2019-12-05 17:32:45 -03:00
Christoph Bülter 623b3982b0
Update doc/en/example/markers.rst
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2019-12-05 16:59:08 +01:00
Christoph Buelter ac5929eef3 Update docs about case-insensitive expression matching 2019-12-05 14:13:22 +01:00
Bruno Oliveira 985ac09048
Merge master into features (#6312)
Merge master into features
2019-12-03 13:36:58 -03:00
Bruno Oliveira 59f95b7f59 Merge remote-tracking branch 'upstream/master' into mm 2019-12-03 11:07:34 -03:00
Bruno Oliveira 41b7b109e9
Merge branch 'features' into unittest-debug 2019-12-03 10:52:53 -03:00
Ran Benita 42fb1f7ede
Merge pull request #6309 from jaredvasquez/fix-cafd-docs
Fix typo in documentation of capfd fixture
2019-12-03 12:15:40 +02:00
Jared Vasquez c00a43a17d fix typo 2019-12-02 22:29:22 -08:00
Ran Benita d2d7b97a70 Remove outdated py2py3 example 2019-12-02 21:16:15 +02:00
Daniel Hahler d3ab56f531 docs: move changelog to docs/en and allow sphinx directives
Now `tox -e docs` will also include the draft changelog for the
next version (locally only).

`CHANGELOG.rst` now only points to the changelog on READTHEDOCS so
sphinx diretives can be used.

Followup to https://github.com/pytest-dev/pytest/pull/6272
2019-11-28 21:23:58 -03:00
Bruno Oliveira 05008f6b55 Preparing release version 5.3.1 2019-11-25 14:32:37 -03:00
Daniel Hahler b9dd0e6210 docs: add missing `log_cli` confval 2019-11-24 22:34:15 +01:00
Ronny Pfannschmidt 15ffe63204 update doc examples **untested** 2019-11-23 21:54:11 +01:00
Daniel Hahler 8b7aeefd7d
Merge pull request #6248 from blueyed/default-role
docs: configure default_role=literal
2019-11-21 18:44:17 +01:00
Zac Hatfield-Dodds 7e10c8191d
Added link checking to tox and release.py (#5614)
Added link checking to tox and release.py
2019-11-21 16:46:13 +11:00
Daniel Hahler be722652f0 docs: configure default_role=literal
This configures the default role for interpreted text (single
backticks), avoiding the need to check for / enforce double backticks.

Fixes also one instance in the existing changelog:

    - Detect `pytest_` prefixed hooks using the internal plugin manager since
      ``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``.
      (`#3487 <https://github.com/pytest-dev/pytest/issues/3487>`_)
2019-11-21 00:35:00 +01:00
Bruno Oliveira 4b16b93cf5 Preparing release version 5.3.0 2019-11-19 12:43:51 -03:00
Bruno Oliveira 89eeefbbaf
Merge pull request #6192 from nicoddemus/remove-reportlog-6180
Remove report_log in favor of pytest-reportlog
2019-11-18 17:58:37 -03:00