Wojtek Erbetowski
d23fbab188
Add autouse fixture order information ( #3404 ).
...
A case with a fixture use both as an autouse and explititly
was raised. This case sounds too narrow to add to documentation
(and could be misleading for people learning pytest with explicitely
using an autouse fixture). At the same time there was no documentation
on the autouse vs regular fixture order, therefore this commit adds
such an information. Code sample grew and it was extracted to the file.
2019-07-13 11:43:47 +02:00
Bruno Oliveira
666acc9b7a
doctest: Add +NUMBER option to ignore irrelevant floating-point… ( #5576 )
...
doctest: Add +NUMBER option to ignore irrelevant floating-point differences
2019-07-11 07:25:37 -03:00
David Röthlisberger
a740ef2036
docs: Document doctest +NUMBER limitation with strings
...
Also added an "xfail" testcase for the same.
2019-07-11 10:06:57 +01:00
Thomas Grainger
c224c4f1d6
de-emphasize request.addfinalizer
2019-07-10 14:52:40 +01:00
Bruno Oliveira
31738155b5
Remove deprecated features ( #5529 )
...
Remove deprecated features
2019-07-09 19:04:06 -03:00
Bruno Oliveira
628ff4d619
Improve docs sidebar layout ( #5568 )
...
Improve docs sidebar layout
2019-07-08 19:24:48 -03:00
Bruno Oliveira
9b78a216a2
Remove unused import
2019-07-08 19:08:09 -03:00
David Röthlisberger
2a23fdab9f
docs: Tidy up doctest options section
...
* Move the parts about "how to configure it" (pytest.ini vs. inline
comment) together.
* Move `--doctest-continue-on-failure` into its own sub-heading, as it
isn't related to the doctest optionflags.
2019-07-08 17:07:58 +01:00
David Röthlisberger
aaa7e837cc
doctest: Add +NUMBER option to ignore irrelevant floating-point differences
...
When enabled, floating-point numbers only need to match as far as the
precision you have written in the expected doctest output. This avoids
false positives caused by limited floating-point precision, like this:
Expected:
0.233
Got:
0.23300000000000001
This is inspired by Sébastien Boisgérault's [numtest] but the
implementation is a bit different:
* This implementation edits the literals that are in the "got"
string (the actual output from the expression being tested), and then
proceeds to compare the strings literally. This is similar to pytest's
existing ALLOW_UNICODE and ALLOW_BYTES implementation.
* This implementation only compares floats against floats, not ints
against floats. That is, the following doctest will fail with pytest
whereas it would pass with numtest:
>>> math.py # doctest: +NUMBER
3
This behaviour should be less surprising (less false negatives) when
you enable NUMBER globally in pytest.ini.
Advantages of this implementation compared to numtest:
* Doesn't require `import numtest` at the top level of the file.
* Works with pytest (if you try to use pytest & numtest together, pytest
raises "TypeError: unbound method check_output() must be called with
NumTestOutputChecker instance as first argument (got
LiteralsOutputChecker instance instead)").
* Works with Python 3.
[numtest]: https://github.com/boisgera/numtest
2019-07-08 17:07:58 +01:00
Tim Hoffmann
71c8ca7d3d
Improve sidebar layout
2019-07-07 20:32:09 +02:00
Tim Hoffmann
56a0dd7658
Update doc footer/copyright
2019-07-07 20:23:56 +02:00
Bruno Oliveira
bb29f31d22
Preparing release version 5.0.1
2019-07-04 20:01:16 -04:00
Bruno Oliveira
b08ae4449b
Add docs about Tidelift and OpenCollective ( #5527 )
...
Add docs about Tidelift and OpenCollective
2019-07-04 07:38:17 -03:00
Anthony Sottile
776a632170
Merge pull request #5540 from bazcrown/yml2yaml
...
Substituted 'yml' to '.yaml' in relevant files
2019-07-03 18:47:26 -04:00
Thomas Grainger
2b9522e9da
remove documentation about setuptools integration Refs #5534
...
integrating with `python setup.py test` is not good practice!
2019-07-03 16:42:53 +01:00
Florian Bruhin
9677099acf
Add upcoming trainings
2019-07-03 14:50:32 +02:00
Michael Moore
1b0e8d73d5
Substituted 'yml' to '.yaml' in relevant files
2019-07-02 23:49:06 -07:00
Andreu Vallbona Plazas
fa9791127a
Added talk about pytest in PyBCN June 2019
...
Added talk about pytest in PyBCN June 2019
2019-07-02 23:18:52 +02:00
Bruno Oliveira
2d9b432613
Add docs about Tidelift and OpenCollective
...
Give an overview of how we as an organization will use the donated money,
as well as show this information more prominently in the docs.
2019-06-30 14:13:30 -03:00
Bruno Oliveira
c470ade0a5
Remove 'RemovedInPytest4Warning'
2019-06-30 13:31:39 -03:00
Bruno Oliveira
7e58defc15
Remove 'pytest.config'
2019-06-30 13:18:07 -03:00
Bruno Oliveira
13f7f27fd2
Remove 'message' parameter from pytest.raises
2019-06-30 13:18:06 -03:00
Bruno Oliveira
279733a30b
Remove support for 'code as string' from pytest.raises and pytest.warns
2019-06-30 11:40:24 -03:00
Bruno Oliveira
d4a76a0b99
doc(plugin_hooks): Improve documentation for writing plugin hoo… ( #5517 )
...
doc(plugin_hooks): Improve documentation for writing plugin hooks.
2019-06-29 09:39:49 -03:00
Bruno Oliveira
789a3662ce
Fix linting
2019-06-29 09:11:09 -03:00
Niklas Meinzer
93a68cdfb4
doc(plugin_hooks): Improve documentation for writing plugin hooks.
2019-06-29 14:02:53 +02:00
Anthony Sottile
844d660d5c
Merge pull request #5520 from asottile/release-4.6.4
...
Preparing release version 4.6.4
2019-06-28 19:09:10 -07:00
Anthony Sottile
58bfc7736f
Use shutil.which to avoid distutils+imp warning
2019-06-28 14:44:49 -07:00
Anthony Sottile
55d2fe076f
Use importlib instead of imp in demo
2019-06-28 14:40:10 -07:00
Anthony Sottile
5e39eb91bb
Correct Zac-HD's name in changelogs
2019-06-28 14:40:10 -07:00
Anthony Sottile
fd2f320485
Preparing release version 5.0.0
2019-06-28 14:39:53 -07:00
Bruno Oliveira
37fb50a3ed
Features assertion pass hook ( #3479 )
...
Features assertion pass hook
2019-06-26 21:14:19 -03:00
Bruno Oliveira
3afee36ebb
Improve docs and reference
2019-06-26 19:15:00 -03:00
Zac Hatfield-Dodds
ed85c83154
Deprecate funcargnames alias
2019-06-26 08:53:17 +10:00
Bruno Oliveira
3f5b078462
Merge pull request #5441 from nicoddemus/faulthandler-5440
...
Integrate pytest-faulthandler into the core
2019-06-24 20:01:15 -03:00
Bruno Oliveira
3ce31b6370
Change pytest-faulthandler for simplification
...
* The --no-faulthandler option is not necessary given that we can use
`-p no:faulthandler`.
* The `--faulthandler-timeout` command-line option has become an ini
option, for the reasons described in
https://github.com/pytest-dev/pytest-faulthandler/issues/34 and
users can still set it from the command-line.
Fix pytest-dev/pytest-faulthandler#34
2019-06-22 19:22:43 -03:00
Bruno Oliveira
a37b902afe
Integrate pytest-faulthandler into the core
...
* Add pytest-faulthandler files unchanged
* Adapt imports and tests
* Add code to skip registration of the external `pytest_faulthandler`
to avoid conflicts
Fix #5440
2019-06-21 21:02:24 -03:00
curiousjazz77
12b76b6261
Update cache.rst
2019-06-21 15:48:59 -07:00
Ronny Pfannschmidt
0627d92df2
fix typos in the resolution of #5125
2019-06-17 20:35:23 +02:00
Ronny Pfannschmidt
1cfea5f1b3
add ExitCode reference in usage
2019-06-15 21:41:55 +02:00
Ronny Pfannschmidt
103d6146b0
document exitcode members
2019-06-15 17:18:21 +02:00
patriksevallius
701d0351a6
Add missing 'e' to test_mod(e).
2019-06-13 06:01:30 +02:00
Anthony Sottile
ede8b87560
Merge pull request #5438 from nicoddemus/result-log-deprecation
...
Postpone removal of --result-log to pytest 6.0
2019-06-12 10:45:02 -07:00
Bruno Oliveira
52780f39ce
Postpone removal of --result-log to pytest 6.0
...
As we did not provide an alternative yet, it is better to postpone
the actual removal until we have provided a suitable and stable
alternative.
Related to #4488
2019-06-12 08:26:11 -03:00
Anthony Sottile
18c2ff6625
Merge pull request #5435 from asottile/release-4.6.3
...
Preparing release version 4.6.3
2019-06-11 09:59:05 -07:00
Ralph Giles
918268774b
Add `slow` marker in run/skip option example.
...
The example implementation of a `--runslow` option results in
a `PytestUnknownMarkWarning`. Include registering the custom
mark in the example, based on the documentation in markers.rst.
2019-06-06 10:15:43 -07:00
Anthony Sottile
be2be040f9
Clean up u' prefixes and py2 bytes conversions
2019-06-04 17:50:34 -07:00
Bruno Oliveira
2a3d643bdf
Documentation: expansion of Monkeypatch to include mocked classes and dictionaries ( #5315 )
...
Documentation: expansion of Monkeypatch to include mocked classes and dictionaries
2019-06-03 19:30:29 -03:00
Anthony Sottile
9657166a22
Merge pull request #5379 from asottile/release-4.6.2
...
Preparing release version 4.6.2
2019-06-03 12:19:42 -07:00
Pulkit Goyal
1d6bbab2b0
Add a new Exceptions section in documentation and document UsageError
2019-06-03 14:23:56 -03:00
Anthony Sottile
4df529e5b9
Clean up __future__ and coding: in tests
2019-06-03 12:08:02 -03:00
Anthony Sottile
a91fe1fedd
pre-commit run pyupgrade --all-files
2019-06-03 12:08:02 -03:00
Anthony Sottile
5034399d7a
pre-commit run fix-encoding-pragma --all-files
2019-06-03 12:08:01 -03:00
Bruno Oliveira
28ac469eaa
Merge pull request #5367 from apollovy/master
...
Fix typo about interpreters count in doc/en/example/parametrize.html
2019-06-02 20:43:53 -03:00
Bruno Oliveira
5999782768
Use python 3 interpreters in example
2019-06-02 19:20:00 -03:00
Bruno Oliveira
6e68532bb3
Merge pull request #5362 from asottile/release-4.6.1 ( #5365 )
...
Merge pull request #5362 from asottile/release-4.6.1
2019-06-02 19:17:29 -03:00
Yuri Apollov
5c016d1021
Fix typo about interpreters count in doc/en/example/parametrize.html
2019-06-02 23:57:22 +03:00
Anthony Sottile
642ef6dc1b
Merge pull request #5362 from asottile/release-4.6.1
...
Preparing release version 4.6.1
2019-06-02 11:47:26 -07:00
Bruno Oliveira
4d49ba6529
Drop Python 2.7 and 3.4 support
...
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs
Related to #5275
2019-06-02 14:39:11 -03:00
Hugo
e2ac4b782a
Fix link anchor
2019-06-01 23:27:20 +03:00
Anthony Sottile
e7cd00ac92
Preparing release version 4.6.0
2019-05-31 23:12:57 -07:00
Bruno Oliveira
f9cafd1c94
Add missing junitxml ini options to the reference docs
2019-05-29 21:13:16 -03:00
Evan Kepner
2dfbed11b4
fix path expansion example
2019-05-27 23:23:18 -04:00
Evan Kepner
24c95c78e7
add updated monkeypatch examples
2019-05-27 20:55:15 -04:00
Bruno Oliveira
e38561037d
Update docs about py27 and py34 support plans
...
As discussed in #5275
2019-05-27 19:28:27 -03:00
Bruno Oliveira
66f20b6f5e
Fix invalid Python file encoding "utf8" ( #5252 )
...
Fix invalid Python file encoding "utf8"
2019-05-23 20:24:23 -03:00
Anthony Sottile
45c894b73f
Merge pull request #5297 from nicoddemus/tidelift-contents
...
Add link to tidelift to the main docs
2019-05-21 08:18:07 -07:00
Bruno Oliveira
d391274f39
Add link to tidelift to the main docs
...
As commented in:
https://github.com/pytest-dev/pytest/pull/5240#issuecomment-494175451
2019-05-21 11:12:07 -03:00
oleg-yegorov
c5fa1d1c3e
Update fixture.rst
...
add a missing import
2019-05-21 09:40:31 +03:00
Nikita Krokosh
858010e214
Fixed double `be` word on monkeypatch docs page.
2019-05-16 18:22:41 +10:00
Bruno Oliveira
e44a2ef653
Apply suggestions from code review
...
Co-Authored-By: Daniel Hahler <github@thequod.de>
2019-05-15 20:45:22 -03:00
Bruno Oliveira
c6e3ff3ce5
Mention "-m" in the main mark docs
2019-05-15 20:45:22 -03:00
Bruno Oliveira
a31098a74e
Move section about mark revamp and iteration to historical notes
...
This has been in place for a long time now, since 3.6.
2019-05-15 20:45:22 -03:00
Bruno Oliveira
7e8044f9b8
Revamp the mark section in the docs
...
Add an introductory section about how to register marks,
including doing so programatically (#5255 ).
2019-05-15 20:45:22 -03:00
Anthony Sottile
dc75b6af47
Use fix-encoding-pragma pre-commit hook
2019-05-14 15:56:31 -07:00
Bruno Oliveira
e668aaf885
Fix indentation and use code-block directives
...
The code-block directives are required by our blacken-docs hook
2019-05-14 18:59:27 -03:00
Evan Kepner
ecd072ea94
add env example to monkeypatch docs
2019-05-12 09:52:22 -04:00
Bruno Oliveira
63fe547d9f
Preparing release version 4.5.0
2019-05-11 16:35:32 +00:00
Bruno Oliveira
465b2d998a
Further "unknown marks warning" improvements ( #5178 )
...
Further "unknown marks warning" improvements
2019-05-11 13:28:10 -03:00
Bruno Oliveira
73bbff2b74
Introduce record_testsuite_property fixture
...
This exposes the functionality introduced in fa6acdc
as a session-scoped fixture.
Plugins that want to remain compatible with the `xunit2`
standard should use this fixture instead of `record_property`.
Fix #5202
2019-05-10 19:44:27 -03:00
Bruno Oliveira
0594dba5ce
Remove unused markers and enable --strict-markers
2019-05-09 19:36:39 -03:00
Bruno Oliveira
685ca96c71
Change ``--strict`` to ``--strict-markers``, preserving the old one
...
Fix #5023
2019-05-09 19:36:38 -03:00
Bruno Oliveira
ccf6c3cb46
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-09 19:22:40 -03:00
Bruno Oliveira
5d7686951c
Run regendoc
2019-05-08 21:50:08 +00:00
Bruno Oliveira
80c5f6e609
Ignore PytestUnknownMark warnings when regen docs
...
A lot of our examples use custom markers to make a point and showcase
features, which generates a lot of warnings
2019-05-08 21:46:26 +00:00
Bruno Oliveira
3ac43314ee
Preparing release version 4.4.2
2019-05-08 12:46:14 -03:00
Anthony Sottile
d1a48ad68f
Use exec directly
2019-05-06 23:07:39 -07:00
Bruno Oliveira
784e1e3b7e
Add links to pytest.raises `message` workaround
...
Related to #3974
2019-05-06 12:35:27 -03:00
Bruno Oliveira
9f66102869
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-04 10:47:57 -03:00
Don Kirkby
254b195f50
Fix a typo
2019-05-03 22:30:20 -07:00
Bruno Oliveira
af40473c9a
Add quick note about accessing config through session or item objects
...
Fix #5030
2019-05-01 11:46:35 -03:00
Bruno Oliveira
204004c8b8
Review doctest docs ( #5183 )
...
Review doctest docs
2019-04-29 08:02:59 -03:00
Bruno Oliveira
772a4a5cf3
Remove all version references to obsolete pytest versions ( #5184 )
...
Remove all version references to obsolete pytest versions
2019-04-29 08:02:32 -03:00
Bruno Oliveira
e943aff995
Update blurb about Sybil
2019-04-28 20:01:22 -03:00
Bruno Oliveira
9c5da9c0d1
Remove all version references to obsolete pytest versions
...
Remove version references to pytest 2 and 3.
Just like Python 3 no longer has references to Python 2, I think
we should follow the same approach in pytest.
2019-04-28 12:37:58 -03:00
Bruno Oliveira
f6ab6d71ad
Run regendoc
2019-04-28 12:17:15 -03:00
Bruno Oliveira
67755d67fb
Review doctest docs
...
* Add pytest.skip() example
* Add blurb about Sybil
* Create a subsection for doctest-options
* Create a subsection for pytest-specific features
2019-04-28 12:17:15 -03:00
Bruno Oliveira
53cd7fd2ea
Introduce new warning subclasses
...
Fix #5177
2019-04-28 10:38:25 -03:00
Bruno Oliveira
8532e991a5
Publish UnknownMarkWarning as part of the public API and docs
2019-04-28 10:16:07 -03:00
Bruno Oliveira
50937fe622
Add note about pytest_load_initial_conftests working only from plugins
...
Fix #5175
2019-04-27 10:12:27 -03:00
Daniel Hahler
7f519f8ab7
Merge master into features
2019-04-27 00:43:00 +02:00
Douglas Thor
0e651d7297
[Docs] Fix typo in skipping.rst
...
One of the `pytest.mark.skipif` blocks does not use the `reason` kwarg.
2019-04-16 09:30:13 -07:00
Bruno Oliveira
8d3a5dcd1b
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-04-15 14:47:45 -03:00
Bruno Oliveira
006dc30476
Preparing release version 4.4.1
2019-04-15 14:24:17 +00:00
Daniel Hahler
6f0a5789fb
Merge master into features
2019-04-14 23:22:21 +02:00
Anthony Sottile
8449294e5d
blacken-docs more code samples in docs
2019-04-12 04:50:26 -07:00
Daniel Hahler
42e60d935a
doc/changelog
2019-04-11 11:44:04 +02:00
Daniel Hahler
1f66e3b0d0
docs: tbreportdemo: remove obsolete comment
2019-04-11 11:39:23 +02:00
Daniel Hahler
eb5b2e0db5
Support glob argument with ``--cache-show``
2019-04-04 18:10:39 +02:00
Daniel Hahler
8907fedc79
Merge master into features (with regen branch)
2019-04-03 22:11:00 +02:00
Daniel Hahler
befc8a3f10
Update via https://github.com/pytest-dev/regendoc/pull/8
2019-04-03 22:08:44 +02:00
Daniel Hahler
5935fbaa7a
doc/en/Makefile: stabilize output between regendoc versions
2019-04-03 22:07:33 +02:00
Daniel Hahler
cec2dd6a7c
doc/en/Makefile: allow passing in REGENDOC_FILES
...
This allows for:
> make -C doc/en regen REGENDOC_FILES=example/parametrize.rst
2019-04-03 19:53:00 +02:00
Daniel Hahler
266bf2c007
doc: make regen: replace trailing spaces already
2019-04-03 17:34:26 +02:00
Daniel Hahler
db34bf01b6
doc: minor whitespace, punctuation
2019-04-03 11:45:45 +02:00
Zac Hatfield-Dodds
9121138a1b
Emit warning for unknown marks
2019-04-01 10:40:18 +11:00
Daniel Hahler
deade370b9
Update doc/en/mark.rst
...
Co-Authored-By: Zac-HD <Zac-HD@users.noreply.github.com>
2019-04-01 07:13:45 +11:00
Zac-HD
bcc08ffe4d
More docs on registering marks
2019-03-31 14:22:30 +11:00
Bruno Oliveira
8881b201aa
Preparing release version 4.4.0
2019-03-29 20:49:18 +00:00
Bruno Oliveira
3d9e68ecfd
Update doc/en/parametrize.rst
2019-03-28 00:07:28 +09:00
ApaDoctor
cf6e2ceafd
add ini option to disable string escape for parametrization
2019-03-28 00:07:28 +09:00
Bruno Oliveira
69a55d334a
Merge pull request #5004 from blueyed/doc-pdb
...
doc: fix note about output capturing with pdb
2019-03-26 20:20:05 -03:00
Bruno Oliveira
057c97812b
Merge pull request #4975 from blueyed/verbose-fixes
...
Fix usages of "verbose" option
2019-03-26 18:38:39 -03:00
Daniel Hahler
52730f6330
doc: fix note about output capturing with pdb
...
[skip travis]
2019-03-26 18:33:00 +01:00
Daniel Hahler
e1ae469504
Merge master into features
2019-03-26 10:23:21 +01:00
Daniel Hahler
23146e7527
Fix usages of "verbose" option
...
With `-qq` `bool(config.getoption("verbose"))` is True; it needs to be
checked for `> 0`.
2019-03-26 10:11:25 +01:00
Daniel Hahler
8e125c9759
doc/en/reference.rst: whitespace/alignment
2019-03-22 13:23:44 +01:00
Brian Skinn
dcbdcc729b
Fix pytestmark syntax in reference.rst
...
pytest 4.3.1 throws an error if `pytestmark` is set to a tuple of marks; it appears to insist on a list.
With `pytestmark = [pytest.mark.api, pytest.mark.good]`:
```
============================== test session starts ==============================
platform win32 -- Python 3.6.3, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: C:\Temp\git\sphobjinv, inifile: tox.ini
plugins: timeout-1.3.3
collected 48 items / 41 deselected / 7 selected
tests\test_api_good.py ....... [100%]
==================== 7 passed, 41 deselected in 0.15 seconds ====================
```
With `pytestmark = (pytest.mark.api, pytest.mark.good)`:
```
==================================== ERRORS =====================================
____________________ ERROR collecting tests/test_api_good.py ____________________
env\lib\site-packages\_pytest\runner.py:226: in from_call
result = func()
env\lib\site-packages\_pytest\runner.py:289: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
env\lib\site-packages\_pytest\python.py:435: in collect
self._inject_setup_module_fixture()
env\lib\site-packages\_pytest\python.py:447: in _inject_setup_module_fixture
setup_module = _get_non_fixture_func(self.obj, "setUpModule")
env\lib\site-packages\_pytest\python.py:255: in obj
self.own_markers.extend(get_unpacked_marks(self.obj))
env\lib\site-packages\_pytest\mark\structures.py:244: in get_unpacked_marks
return normalize_mark_list(mark_list)
env\lib\site-packages\_pytest\mark\structures.py:259: in normalize_mark_list
raise TypeError("got {!r} instead of Mark".format(mark))
E TypeError: got (MarkDecorator(mark=Mark(name='api', args=(), kwargs={})), MarkDecorator(mark=Mark(name='good', args=(), kwargs={}))) instead of Mark
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
==================== 19 deselected, 1 error in 0.27 seconds =====================
```
2019-03-21 15:14:28 -04:00
Daniel Hahler
751c061d9a
Merge master into features
2019-03-19 01:07:10 +01:00
smheidrich
519157cfcf
Minor grammar fixes in pytest.mark.xfail docs
2019-03-17 10:14:40 +01:00
Miro Hrončok
2af0a023c9
Pin sphinx-removed-in to >= 0.2.0 to support Sphinx 2.0
...
Fixes https://github.com/pytest-dev/pytest/issues/4912
2019-03-15 10:56:13 +01:00
Daniel Hahler
7afe17740f
Merge master into features
2019-03-15 00:52:12 +01:00
Miro Hrončok
134b957bf4
Remove deprecated Sphinx directive add_description_unit()
...
Partial solution for https://github.com/pytest-dev/pytest/issues/4912
2019-03-14 12:16:59 +01:00
Daniel Hahler
f4bcb44025
docs: pin Sphinx to <2.0
...
Ref: https://github.com/pytest-dev/pytest/issues/4912
2019-03-13 02:36:15 +01:00
Bruno Oliveira
492cc4219c
Prepare release 4.3.1
2019-03-11 12:59:54 -03:00
Kyle Altendorf
2d43f42769
Add missing plugin hooks to docs
...
pytest-dev/pytest#4896
2019-03-08 09:24:01 -05:00
Daniel Hahler
76687030f0
Merge branch 'master' into merge-master-into-features
...
Conflicts:
appveyor.yml
setup.py
2019-03-05 19:07:36 +01:00
Bruno Oliveira
dac164cc99
Add missing ref docs to tmp_path and tmp_path_factory
2019-03-01 17:09:07 -03:00
Daniel Hahler
fec656b3b1
Apply suggestions from code review
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com>
2019-02-27 07:46:03 -03:00
Bruno Oliveira
16cbb3196c
Document how to disable caching rewritten .pyc files to disk
...
Also changed how the section is presented: instead of "Note" blocks, use proper
sections as those contain enough information to exist on their own.
Fix #1680
2019-02-26 20:42:59 -03:00
Daniel Hahler
29112d7e0b
Merge master into features
2019-02-26 11:48:10 +01:00
Zac-HD
d9bdf5cfca
Clarify docs on --strict marks
2019-02-25 22:30:49 +11:00
Bruno Oliveira
a0207274f4
-p option now can be used to early-load plugins by entry-point name
...
Fixes #4718
2019-02-24 13:20:17 -03:00
Bruno Oliveira
2e210acd00
Merge pull request #4819 from Handsome2734/doc-fix
...
add notice to use [tool:pytest] in setup.cfg
2019-02-24 12:16:30 -03:00
Bruno Oliveira
3e11bd0d6e
Update wording about [tool:pytest] in setup.cfg files
2019-02-23 15:32:42 -03:00
Bruno Oliveira
6a4c7063fd
Fix docs about pytest conventions for test functions
...
Fix #4818
2019-02-23 15:22:27 -03:00
songbowen
15fe60aa25
add notice to use [tool:pytest] in setup.cfg
2019-02-24 00:24:56 +08:00
Bruno Oliveira
e1aeb6915e
Fix linting
2019-02-21 13:27:12 -03:00
Bruno Oliveira
e75915bb73
Revert recommending virtualenv for Python 3.4
...
`venv` is already available in Python 3.4, my mistake
2019-02-21 13:03:19 -03:00
Bruno Oliveira
ba2a43266a
Mention that virtualenv should be used for Python 3.4 as well
2019-02-21 12:52:09 -03:00
Jeff Hale
cfaa8bbee8
recommend venv or virtualenv, depending on python version
...
venv has been installed with Python since 3.3. https://docs.python.org/3/library/venv.html
2019-02-21 10:50:49 -05:00
Jeff Hale
6b661795cf
update links.inc to include both venv and virtualenv
2019-02-21 10:41:59 -05:00
Jeff Hale
fa65b71c98
Merge pull request #1 from discdiver/discdiver-patch-1
...
update links for virtualenv -> venv
2019-02-20 15:41:39 -05:00
Jeff Hale
da5dec83f6
update links for virtualenv -> venv
2019-02-20 15:36:34 -05:00
Jeff Hale
2ef3cb2510
Recommend use venv instead of virtualenv
...
From the Python docs:
"Changed in version 3.5: The use of venv is now recommended for creating virtual environments."
-https://docs.python.org/3/library/venv.html
2019-02-20 15:33:48 -05:00
Zac Hatfield-Dodds
c8a87e48ab
Merge pull request #4783 from gyermolenko/fix_syntax_highlighting_for_two_rst_docs
...
Fix sphinx code-block types (syntax highlighting) in two docs
2019-02-20 06:31:10 +11:00
Daniel Hahler
ff015f6308
Fix docs (tox -e regen, plus pre-commit)
2019-02-18 18:46:03 +01:00
Bruno Oliveira
31c869b4c4
Preparing release version 4.3.0
2019-02-16 14:11:58 +00:00
Bruno Oliveira
0395996756
Merge remote-tracking branch 'upstream/master' into release-4.3.0
2019-02-16 14:06:51 +00:00
Bruno Oliveira
986dd84375
LoggingPlugin: Support to customize log_file from hook ( #4752 )
...
LoggingPlugin: Support to customize log_file from hook
2019-02-16 12:01:21 -02:00
Andras Mitzki
e3824d23bc
LoggingPlugin: Expose setting log_file_handler
...
- This patch allows to set log_file (path) from hook
Signed-off-by: Thomas Hisch
Signed-off-by: Andras Mitzki <andras.mitzki@balabit.com>
2019-02-15 16:05:10 +01:00
Grygorii Iermolenko
59f69dd9e7
Add good talk by Andrew Svetlov
2019-02-15 15:37:18 +02:00
Grygorii Iermolenko
6e1ee0802f
Fix sphinx code-block types for remaining rst docs
2019-02-15 15:10:37 +02:00
Grygorii Iermolenko
5cf58a9ae9
Revert '$' changes to not trigger regendoc
2019-02-15 14:09:37 +02:00
Bruno Oliveira
4bc2f96c93
Remove 'message' parameter docs from assert.rst
...
As per:
https://github.com/pytest-dev/pytest/issues/3974#issuecomment-463462732
Also made the 'match' parameter more prominent
2019-02-14 08:32:49 -02:00
Daniel Hahler
7b91952645
Merge master into features
...
Conflicts:
tox.ini
2019-02-13 17:58:16 +01:00
Grygorii Iermolenko
799bcccd1b
Fix sphinx code-block types (syntax highlighting) in two docs
2019-02-13 17:08:49 +02:00
Bruno Oliveira
82cc3d8cc2
Preparing release version 4.2.1
2019-02-12 20:17:06 +00:00
Kevin J. Foley
aee67bb1a7
Clarify pytest_assertrepr_compare docs per #4759
2019-02-10 08:34:35 -05:00
Bruno Oliveira
7f6108beb1
Add ref docs for junit_family option
2019-02-08 21:44:52 -02:00
Daniel Hahler
fc8800c71f
Merge pull request #4722 from fetzerch/ignore_wildcards
...
Add ability to use globs when using --ignore
2019-02-09 00:11:04 +01:00
Ronny Pfannschmidt
526f4a95cc
Merge pull request #4735 from kohr-h/pytest_plugins_module_name
...
Mention that `pytest_plugins` should not be used as module name
2019-02-07 07:07:58 +01:00
Bruno Oliveira
2f083504ee
Merge pull request #4709 from namurphy/warns-docs
...
Document how to customize test failure message for missing warnings
2019-02-06 20:51:14 -02:00
Holger Kohr
7445b5345f
Mention that `pytest_plugins` should not be used as module name
2019-02-06 21:57:42 +01:00
Christian Fetzer
1876a928d3
Document collect_ignore and collect_ignore_glob in reference
2019-02-06 17:15:30 +01:00
Christian Fetzer
2dc2a19db5
Add ability to exclude files matching glob patterns in conftest.py
...
This adds the `collect_ignore_glob` option for `conftest.py` to allow
Unix-style wildcards for excluding files.
2019-02-06 16:49:43 +01:00
Christian Fetzer
fc5d4654e5
Add ability to exclude files matching glob patterns with --ignore-glob
...
This adds the `--ignore-glob` option to allow Unix-style wildcards so
that `--ignore-glob=integration*` excludes all tests that reside in
files starting with `integration`.
Fixes : #3711
2019-02-06 11:29:30 +01:00
Bruno Oliveira
584c052da4
Fix linting and change False to True as requested in review
2019-02-05 19:04:26 -02:00
Anthony Sottile
2264db7f4a
Merge pull request #4682 from arel/parameterize-conditional-raises-document-only
...
Document parametrizing conditional raises
2019-02-02 13:15:26 -08:00
Nick Murphy
f0ecb25acd
Document custom failure messages for missing warnings
2019-02-01 21:48:29 -05:00
Arel Cordero
7ec1a1407a
Incorporating feedback from asottile
2019-02-02 01:57:17 +00:00
Bruno Oliveira
fa979a4290
Preparing release version 4.2.0
2019-01-30 14:25:38 -02:00
Bruno Oliveira
ade5f2c8c5
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-01-29 19:36:56 -02:00
Arel Cordero
8a1afe4213
Including note on using nullcontext in Python 3.7+
2019-01-28 13:31:08 +00:00
Arel Cordero
fd4289dae0
Adding `does_not_raise` to documentation only
2019-01-27 16:42:10 +00:00
Arel Cordero
977adf1354
Improving sphinx docs based on feedback
2019-01-27 16:41:23 +00:00
Arel Cordero
c166b80a8c
Documenting raises/does_not_raise + parametrize
2019-01-27 16:40:49 +00:00
Bruno Oliveira
067f2c6148
Improve pytest.raises 'message' deprecation docs
...
Based on recent discussions in #3974
2019-01-24 20:41:18 -02:00
Bruno Oliveira
daf39112e7
Merge pull request #4091 from nicoddemus/setup-methods-as-fixtures-3094
...
Use fixtures to invoke xunit-style fixtures
2019-01-23 19:23:31 -02:00
Anthony Sottile
92a2c1a9c4
remove and ban py.io.BytesIO, py.process, py.path.local.sysfind
2019-01-21 19:51:16 -08:00
Bruno Oliveira
e2a9aaf24b
Add docs page about plans for dropping py27 and py34
...
Fix #4635
2019-01-14 22:10:15 -02:00
Bruno Oliveira
e48f68953d
Merge pull request #4638 from nicoddemus/release-4.1.1
...
Preparing release version 4.1.1
2019-01-12 12:51:32 -02:00
Bruno Oliveira
25081d8e30
Merge pull request #4570 from nicoddemus/sphinx-removed-in
...
Use sphinx removed in extension in the documentation
2019-01-12 08:34:29 -02:00
Bruno Oliveira
34eeda1c09
Preparing release version 4.1.1
2019-01-12 00:55:12 +00:00
Bruno Oliveira
0f918b1a9d
xunit-style functions and methods are invoked by autouse fixtures
...
Fix #3094 , Fix #517
2019-01-10 12:10:04 -02:00
Bruno Oliveira
9f6d9efc1d
Mention PYTHONPATH semantics in goodpractices.rst
...
Fix #4625
2019-01-09 22:45:09 -02:00
Yoav Caspi
2467831913
rephrase warning section to explain better the issue.
2019-01-09 23:52:08 +02:00
Yoav Caspi
6ee5d431a0
add warning for using non canonical configuration files.
2019-01-06 23:11:24 +02:00
Bruno Oliveira
38adb23bd2
Merge pull request #4600 from nicoddemus/release-4.1.0
...
Release 4.1.0
2019-01-06 13:09:11 -02:00
Bruno Oliveira
e24031fb36
Regendocs again, without hypothesis
2019-01-05 20:42:44 +00:00
Bruno Oliveira
99ef8c6d16
Fix typo in Makefile: PYTEST_ADDOPT -> PYTEST_ADDOPTS
2019-01-05 20:31:01 +00:00
Bruno Oliveira
d7465895d0
Regendoc again
2019-01-05 19:19:40 +00:00
Bruno Oliveira
01151ff566
Add example for -ra usage to the docs
2019-01-05 16:53:12 -02:00
Bruno Oliveira
d0e9b4812f
Regendocs
2019-01-05 16:38:59 -02:00
Bruno Oliveira
9d297c06e8
Preparing release version 4.1.0
2019-01-05 16:38:59 -02:00
Anthony Sottile
e24fdb138d
Merge pull request #4598 from nicoddemus/license-year
...
Update copyright year
2019-01-05 09:09:55 -08:00
Bruno Oliveira
7f671586b0
Update copyright year
2019-01-04 10:37:07 -02:00
David Vo
9e62f9d64e
Fix PEP 565 typo in warnings.rst
2019-01-04 11:50:36 +11:00
Bruno Oliveira
81c2780d2b
Move Node.get_marker and markname deprecations next to the other 4.0 ones
2019-01-02 19:37:17 -02:00
Bruno Oliveira
b39b69a730
Use sphinx-removed-in extension in the documentation
...
Fix #4568
2019-01-02 19:34:46 -02:00
Bruno Oliveira
30c7a7bd69
Merge remote-tracking branch 'upstream/master' into features
2019-01-02 19:16:18 -02:00
Adam Johnson
388aff16c8
Improve detailed summary report docs
...
The existing examples had 0 tests collected so didn't show the actual summary report. Also I added a section explaining the difference between `p` and `P`.
2018-12-29 11:47:39 +00:00
Anthony Sottile
2dc8cc1e48
Remove out of date dependencies list in docs
...
Was scrolling through the docs and noticed this, I figure it's easier to remove this than try and keep it in sync with setup.py
2018-12-25 20:46:48 -05:00
Randy Barlow
b2c4ed9a2b
Remove an extraneous comma from the docs.
...
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2018-12-21 17:53:28 -05:00
Ronny Pfannschmidt
8f8d3114dd
apply suggested enhancements in deprecations.rst
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
64a353f2b6
update deprecation docs
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
b258764ffe
fix docs
2018-12-21 14:02:38 +01:00
Hyunchel Kim
ece01b0f56
Update cache documentation example to correctly show cache hit and miss
2018-12-21 04:43:26 +00:00
Bruno Oliveira
c378cb4793
Remove support for applying marks to values in parametrize
...
Fix #3082
2018-12-20 16:16:13 -02:00
Bruno Oliveira
a93f41233a
Raise an error if pytest_plugins is defined in a non-top-level conftest.py file
...
Fix #4548
2018-12-19 18:09:47 -02:00
Bruno Oliveira
9138419379
Remove support for '[pytest]' section in setup.cfg file
...
Fix #3086
2018-12-19 17:43:17 -02:00
Bruno Oliveira
0115766df3
Calling fixtures directly is now an error instead of a warning
...
Fix #4545
2018-12-19 09:26:29 -02:00
Bruno Oliveira
b7e8171cf8
Merge branch 'features' into remove-legacy-warn
2018-12-17 10:37:31 -02:00
Bruno Oliveira
843d00c219
Fix linting
2018-12-17 10:35:17 -02:00
Bruno Oliveira
c6d27d8224
Merge pull request #4555 from nicoddemus/remove-record-xml-pytest-main-str
...
Remove record_xml_property and support for strings in pytest.main()
2018-12-17 10:08:51 -02:00
Bruno Oliveira
84390acccc
Merge pull request #4553 from nicoddemus/junit-durations
...
Rename "junit_time" to "junit_duration_report" option
2018-12-17 10:08:20 -02:00
Kanguros
60773e0a97
Updating markers example to newest pytest version
2018-12-16 21:13:14 +01:00
Bruno Oliveira
a7e401656e
Remove support to pass strings to pytest.main()
...
Fix #3085
2018-12-14 15:45:47 -02:00
Bruno Oliveira
6e1b1abfa7
Remove deprecated record_xml_property
...
Fix #4547
2018-12-14 15:10:08 -02:00
Daniel Hahler
8e287c5c77
Merge master into features
2018-12-14 16:44:43 +01:00
Bruno Oliveira
231863b133
Rename "junit_time" to "junit_duration_report" option
...
Just realized while reading the changelog that "junit_time" is not a very good
name, so I decided to open this PR renaming it to "junit_duration_report" which
I believe conveys the meaning of the option better
2018-12-14 12:56:26 -02:00
Bruno Oliveira
fd48cd57f9
Remove config.warn, Node.warn; pytest_logwarning issues a warning when implemented
...
Fix #3078
2018-12-14 12:50:18 -02:00
Bruno Oliveira
1e80a9cb34
Remove pytest_funcarg__ prefix support for defining fixtures
...
Fix #4543
2018-12-13 21:41:38 -02:00
Bruno Oliveira
6c5a1150d4
Preparing release version 4.0.2
2018-12-13 23:37:51 +00:00
Bruno Oliveira
26d202a7bd
Merge pull request #4529 from aparamon/jxmlunit-call-time
...
Add --junittime=call option
2018-12-13 13:51:06 -02:00
Bruno Oliveira
5b83417afc
Deprecate the 'message' parameter of pytest.raises
...
Fix #3974
2018-12-12 22:26:30 -02:00
Bruno Oliveira
e3d30f8ebf
Remove deprecated PyCollector.makeitem
...
Fix #4535
2018-12-12 14:15:52 -02:00
Andrey Paramonov
ec4507d12a
Fix doc formatting
2018-12-12 14:33:02 +03:00
Andrey Paramonov
b1e766c30e
Update docs
2018-12-12 13:27:44 +03:00
Daniel Hahler
0db5ccb0dd
Merge master into features
2018-12-10 05:42:07 +01:00
Tomer Keren
cb52d17d07
Document doctest fixture pitfalls
2018-12-05 11:25:52 +02:00
Yash Todi
db32949c50
Rectified typo
2018-12-04 19:33:13 +05:30
Anthony Sottile
ae92b8c624
Upgrade sphinx doc requirements
2018-12-03 15:30:45 -08:00
Anthony Sottile
b88c3f8f82
Deprecate pytest.config
2018-12-03 09:01:42 -08:00
Bruno Oliveira
a131f0acf6
Merge pull request #4490 from nicoddemus/remove-cached-setup-add-call
...
Remove cached_setup and Metafunc.addcall
2018-12-01 18:44:51 -02:00
Bruno Oliveira
40b85d7ee8
Remove Metafunc.addcall
...
Fix #3083
2018-12-01 16:41:59 -02:00
Bruno Oliveira
090f7ff449
Remove request.cached_setup
...
Fix #4489
2018-12-01 15:59:44 -02:00
Bruno Oliveira
b05061dcd2
Change deprecation type of --result-log to PytestDeprecationWarning
...
It was decided to deprecate this on a later date (see discussion in #4447 )
2018-12-01 14:29:50 -02:00
Bruno Oliveira
63f38de38e
Merge remote-tracking branch 'upstream/features' into update-deprecations-docs
2018-12-01 14:16:20 -02:00
Anthony Sottile
1bba0a9714
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')
2018-11-29 09:34:51 -08:00