Ronny Pfannschmidt
f1d51ba1f5
deprecate the pytest.collect module
...
changelog
minimal unittest for collect module deprecations
\!fixup - changelog typo
2020-03-30 21:53:07 +02:00
Ronny Pfannschmidt
eab2831671
fix #6951 : allow to write TerminalReporter.writer
2020-03-30 21:31:53 +02:00
smarie
95fadd5740
Improved time counter used to compute test durations. ( #6939 )
...
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-03-29 15:20:09 +03:00
Daniel Hahler
1fda861190
Fix crash when printing while capsysbinary is active
...
Previously, writing to sys.stdout/stderr in text-mode (e.g.
`print('foo')`) while a `capsysbinary` fixture is active, would crash
with:
/usr/lib/python3.7/contextlib.py:119: in __exit__
next(self.gen)
E TypeError: write() argument must be str, not bytes
This is due to some confusion in the types. The relevant functions are
`snap()` and `writeorg()`. The function `snap()` returns what was
captured, and the return type should be `bytes` for the binary captures
and `str` for the regular ones. The `snap()` return value is eventually
passed to `writeorg()` to be written to the original file, so it's input
type should correspond to `snap()`. But this was incorrect for
`SysCaptureBinary`, which handled it like `str`.
To fix this, be explicit in the `snap()` and `writeorg()`
implementations, also of the other Capture types.
We can't add type annotations yet, because the current inheritance
scheme breaks Liskov Substitution and mypy would complain. To be
refactored later.
Fixes: https://github.com/pytest-dev/pytest/issues/6871
Co-authored-by: Ran Benita (some modifications & commit message)
2020-03-16 18:21:33 +02:00
Bruno Oliveira
010e711971
Merge pull request #6914 from nicoddemus/revert-6330
...
Revert "[parametrize] enforce explicit argnames declaration (#6330 )"
2020-03-13 10:49:48 -03:00
Bruno Oliveira
2eedf9c2aa
Merge pull request #6910 from nicoddemus/resultlog-logreport
...
Handle unknown stats in pytest_report_teststatus hook
2020-03-13 09:30:04 -03:00
Ran Benita
6e70fecbe4
Merge pull request #6903 from bluetech/assume-dup
...
Assume os.dup is always available
2020-03-13 11:01:44 +02:00
Bruno Oliveira
0c58ed2cc0
Handle unknown stats in pytest_report_teststatus hook
...
Noticed that the pytest_report_teststatus of reportlog was not properly
handling unknown statuses while taking a look at:
https://github.com/pytest-dev/pytest-rerunfailures/issues/103
2020-03-12 20:52:22 -03:00
Ran Benita
6954b3b0dc
Assume os.dup is always available
...
The commit which added the checks for os.dup a15afb5e48
suggests it was done for Jython. But pytest doesn't support Jython
anymore (Jython is Python 2 only).
Furthermore, it looks like the faulthandler plugin (bundled in pytest
and enabled by default) uses os.dup() unprotected and there have not
been any complaints.
So seems better to just remove these checks, and only add if someone
with a legitimate use case complains.
2020-03-12 16:47:15 +02:00
pytest bot
c9fd1bdbd6
Preparing release version 5.4.0
2020-03-12 14:14:35 +00:00
Daniel Hahler
acec0b688f
Fix usage of pytester with doctests ( #6802 )
...
Use `request.node.name` instead of `request.function.__name__`:
`request.function` is `None` with `DoctestItem`s.
2020-03-04 05:33:50 +01:00
Ronny Pfannschmidt
9fd71d6fe0
fix #571 : deprecate pytest_collect_directory as ... ( #6847 )
...
Deprecate pytest_collect_directory
Fix #571
Co-authored-by: Daniel Hahler <github@thequod.de>
2020-03-03 18:58:14 -03:00
Bruno Oliveira
a03e076e89
Update changelog/6285.feature.rst
...
Co-Authored-By: Ran Benita <ran234@gmail.com>
2020-03-03 09:59:38 -03:00
earonesty
0f00495548
Create 6285.feature.rst
2020-03-03 09:59:38 -03:00
Ronny Pfannschmidt
194b52145b
Merge pull request #6834 from RonnyPfannschmidt/fix-6833-summarize-warning-item-locations
...
summarize warning summaries if the number of locations is high
2020-03-01 20:21:36 +01:00
Ronny Pfannschmidt
23c43a37e0
summarize warning summaries if the number of locations is high
2020-03-01 14:08:15 +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
4b53bbc0a9
docs: use doc/en/_build/html for html output ( #6842 )
...
This will use the same directory as `make -C doc/en` then, and reflects
the default location that Sphinx uses.
2020-02-29 00:47:30 +01:00
Daniel Hahler
5819536f00
Improve UsageError with invalid `-o` style ( #6795 )
...
This started from fixing the test, where `"xdist_strict True"` was used
as a single argument, although you typically would see `["xdist_strict",
"True"]`.
Improves the error message to mention the option that caused the error.
2020-02-28 19:41:56 +01:00
Daniel Hahler
ac3a42bafd
doctest: strip newlines with unexpected exceptions ( #6801 )
2020-02-24 15:18:08 +01:00
Daniel Hahler
c8b4a1a471
Handle `match` with `pytest.raises()` ( #6753 )
...
Fixes https://github.com/pytest-dev/pytest/issues/6752 .
2020-02-22 23:32:55 +01:00
Daniel Hahler
68fe0eb8f3
Minor cosmetic fixes ( #6792 )
2020-02-22 19:24:41 +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
Daniel Hahler
2277817176
Fix grammar in changelog/6737.breaking.rst
2020-02-22 13:15:17 +01:00
Bruno Oliveira
435ad221f9
Deprecate TerminalReporter.writer
...
Fix #6779
2020-02-20 21:04:49 -03:00
Daniel Hahler
1b30514783
LFPlugin: use sub-plugins to deselect during collection ( #6448 )
...
Fixes https://github.com/pytest-dev/pytest/issues/5301 .
Refactor/steps:
- use var
- harden test_lastfailed_usecase
- harden test_failedfirst_order
- revisit last_failed_paths
- harden test_lastfailed_with_known_failures_not_being_selected
2020-02-19 21:33:03 +01:00
Daniel Hahler
f95c7f5803
doctest: handle any OutcomeException ( #6669 )
...
Fixes using `pytest.xfail()` and `pytest.importorskip()` in doctests.
Ref: https://github.com/pytest-dev/pytest/issues/310
2020-02-19 13:16:37 +01:00
Daniel Hahler
369284752e
terminal: refactor, no yellow ("boring") for non-last item ( #6409 )
2020-02-15 19:00:24 +01:00
Daniel Hahler
e872532d0c
Merge branch 'master' into term-color
...
Conflicts:
src/_pytest/terminal.py
testing/test_debugging.py
testing/test_terminal.py
2020-02-15 18:46:29 +01:00
kpinc
9785ee438d
doc: expand first sentence on fixtures into a paragraph ( #6742 )
2020-02-15 18:35:36 +01:00
Ran Benita
d839686c7b
Don't delete FixtureDef.cached_result, set it to None instead
...
Previously `cached_result` was either set or deleted. Type annotations
cannot handle this, so use `None` for the non-set state instead.
2020-02-14 14:18:58 +02: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
Bruno Oliveira
4209ad6fca
Use code highlighting if pygments is installed ( #6658 )
...
* Use code highlighting if pygments is installed
* Use colorama constants instead of bare ascii codes
Could not find the exact equivalent of 'hl-reset' code using colorama
constants though.
* Refactor ASCII color handling into a fixture
* Revert back to using explicit color codes
* In Python 3.5 skip rest of tests that require ordered markup in colored output
2020-02-12 08:32:37 -03:00
Bruno Oliveira
3ea74310d7
Fix crash when faulthandler starts initialized ( #6598 )
...
Use suggestion in review and use a subplugin so hooks will only be active
if we enable faulthandler ourselves.
Fix #6575
Co-authored-by: Daniel Hahler <git@thequod.de>
2020-02-12 11:06:20 +01: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
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
Daniel Hahler
a8fc056aad
Handle `Exit` exception in `pytest_sessionfinish` ( #6660 )
2020-02-07 00:40:10 +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
Daniel Hahler
39d9f7cff5
pytester: LineMatcher: typing, docs, consecutive line matching ( #6653 )
2020-02-04 22:47:18 +01:00
Daniel Hahler
aa0328782f
assertion: save/restore hooks on item ( #6646 )
2020-02-04 02:56:23 +01:00
Daniel Hahler
75714ee707
pluginmanager.consider_preparse: add exclude_only kwarg ( #6443 )
...
Plugins specified with ``-p`` are now loaded after internal plugins, which
results in their hooks being called *before* the internal ones.
This makes the ``-p`` behavior consistent with ``PYTEST_PLUGINS``.
* fix/adjust test_disable_plugin_autoload
* adjust test_plugin_loading_order
2020-02-03 14:10:54 +01:00
Daniel Hahler
99d162e44a
Handle `Exit` exception in `pytest_sessionfinish`
...
Similar to a7268aa
(https://github.com/pytest-dev/pytest/pull/6258 ).
2020-02-02 23:13:23 +01:00
Daniel Hahler
5256542ea4
pytester.LineMatcher: add support for matching lines consecutively
2020-02-01 23:48:58 +01:00
Bruno Oliveira
70739296e1
Remove deprecated 'pytest_itemstart' hook
...
This hook has been deprecated/removed for more than 10 years
in a2fe6714f8
.
2020-01-30 21:03:29 -03:00
Bruno Oliveira
64ab68ff0a
Fix 6341 disallow session config in fromparent ( #6387 )
...
Fix 6341 disallow session config in fromparent
2020-01-29 19:21:02 -03:00
Anthony Sottile
595d62bc3e
Merge pull request #6607 from asottile/empty_string_parametrize_nodeid
...
Fix node ids which contain a parametrized empty-string variable
2020-01-29 08:42:04 -08:00
Daniel Hahler
55e5817570
Merge master into features
2020-01-29 03:07:35 +01:00
Daniel Hahler
3ccf2a5e61
Merge pull request #6524 from blueyed/reportchars-default
...
terminal: default to `fE` with `-r` (reportchars)
2020-01-29 01:00:41 +01: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
Anthony Sottile
abd5fc80e8
Fix node ids which contain a parametrized empty-string variable
2020-01-28 13:27:54 -08:00
Holger Kohr
80d4dd6f0b
Replace `==` with `is` for comparison of cache keys
...
Closes #6497
2020-01-28 18:05:53 -03:00
Daniel Hahler
30922ee694
Merge master into features
2020-01-28 01:40:14 +01:00
Daniel Hahler
039d582b52
Fix `EncodedFile.writelines`
...
This is implemented by the underlying stream already, which additionally
checks if the stream is not closed, and calls `write` per line.
Ref/via: https://github.com/pytest-dev/pytest/pull/6558#issuecomment-578210807
2020-01-25 18:06:50 +01:00
Daniel Hahler
57512aa997
_get_main_color: no yellow ("boring") for non-last item
...
- refactor _get_main_color/build_summary_stats_line
- factor out property _is_last_item; test_summary_stats: tr._is_last_item
- _write_progress_information_filling_space: remove color arg
- use setter for stats, handling main color
- _get_main_color: skip cache for last item
- Handle random order in test for py35.
2020-01-25 15:09:02 +01:00
Daniel Hahler
c51173d426
Merge master into features
2020-01-25 14:18:02 +01:00
Tomáš Gavenčiak
5e15c86cc6
Fix EncodedFile.write return value
...
Make EncodedFile, used for captured output streams, method .write return
the number of characters written. Add test for captured stderr write.
Fixes #6557 .
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2020-01-25 10:36:23 +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
cdd6f86e43
bug-fix fixes
2020-01-23 20:34:21 +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
0dc82e8501
Add CHANGELOG entry for #6496
2020-01-20 13:32:27 -03:00
Bruno Oliveira
56dc301c50
Preparing release version 5.3.3
2020-01-16 18:55:41 -05:00
Daniel Hahler
1667cf3350
Merge pull request #6384 from pv/showlocals-short
...
Make --showlocals work together with --tb=short
Fixes https://github.com/pytest-dev/pytest/issues/494
Ref: https://github.com/pytest-dev/pytest/issues/1715
2020-01-16 22:04:14 +01:00
Daniel Hahler
83813bf515
Merge master into features
...
Conflicts:
.github/workflows/main.yml
2020-01-16 19:45:52 +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
Chris NeJame
99180939fe
fixtures register finalizers with all fixtures before them in the stack
2020-01-15 11:00:42 -05:00
Ronny Pfannschmidt
8ba0b7bc2a
fix #6341 - disallow session/config in Node.from_parent
2020-01-15 13:00:46 +01: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
61d04d3084
terminal: summary_passes: handle teardown sections
...
Fixes https://github.com/pytest-dev/pytest/issues/2780 .
2020-01-11 21:58:19 +01:00
Daniel Hahler
1356d20e90
Merge master into features
2020-01-10 05:20:41 +01: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
Bruno Oliveira
5b295ec68e
Merge remote-tracking branch 'upstream/features' into gftea/features
2020-01-09 18:41:47 -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
Bruno Oliveira
0e00069340
Fix serialization of 'None' reprcrashes
...
Tracebacks coming from remote processes crated by the multiprocess module
will contain "RemoteTracebacks" which don't have a 'reprcrash' attribute
Fix #5971
2020-01-06 22:04:38 -03:00
Bruno Oliveira
91a96ec3d6
Remove usage of parser module, deprecated in Python 3.9
...
Fix #6404
2020-01-06 08:57:07 -03:00
Bruno Oliveira
12f74a28fa
Revert "Remove unused _pytest.code.Source.isparseable function"
...
This reverts commit c627ac4e59
.
2020-01-05 14:12:40 -03:00
Bruno Oliveira
c627ac4e59
Remove unused _pytest.code.Source.isparseable function
...
Besides unused, it uses the (deprecated in Python 3.9) parser module
Fix #6404
2020-01-05 12:33:12 -03:00
Daniel Hahler
1c0242dec1
Fix `RunResult.parseoutcomes` (follow-up to #6353 )
2019-12-30 17:08:52 +01:00
Bruno Oliveira
8077168387
pytester: quick fix error introduced in #5990 ( #6353 )
...
pytester: quick fix error introduced in #5990
2019-12-27 13:28:11 -03:00
Alexandre Mulatinho
dc7bf518b3
pytester: quick fix error introduced in #5990
...
- added a test to check this condition
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
2019-12-18 16:36:24 -03: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
Seth Junot
d4879c7afb
Optimized renaming of test parameter ids
...
While using pytest-repeat, I noticed the previous implementation is slow
for a large number of duplicate test ids. To optimize, this commit
reduces the amount of data copied and avoids using `in` with List
(unhashable type, and therefore is very slow for many elements).
2019-12-16 18:53:48 -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
10fcac7f90
Preparing release version 5.3.2
2019-12-13 08:51:15 -03:00
Bruno Oliveira
8942a05cfe
Change 4639 from feature to improvement
...
An improvement seems more adequate here.
2019-12-13 08:46:47 -03:00
Bruno Oliveira
66c1a120ba
Bugfix 5430 pass logs to junit report ( #6274 )
...
Bugfix 5430 pass logs to junit report
2019-12-12 09:35:25 -03:00
gftea
226f0c48bf
fix #5686 , mktemp now fails given absolute and non-normalized paths.
2019-12-12 13:00:23 +01:00
Bruno Oliveira
9b74bf1e0c
Add CHANGELOG entry for #6334
2019-12-12 08:05:22 -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
Bruno Oliveira
0711060422
Change 4639 from feature to improvement
...
An improvement seems more adequate here.
2019-12-09 15:57:19 -03:00
cmachalo
e13ad22364
Include new --capture-mode=tee-sys option
...
Fix #4597
2019-12-09 13:05:23 -03:00
Bruno Oliveira
c6ed69a666
Replace 'removal' by 'breaking' changelog category
...
As discussed, sometimes we will need to introduce changes
which are not necessarily removals but might break existing
suites
2019-12-06 08:50:35 -03:00
Christoph Buelter
5a7de2c2cb
Add changelog file for PR 6316
2019-12-05 14:28:21 +01:00
Bruno Oliveira
c7f9fda42d
Fix assertion rewriting module detection for egg dists
...
Fix #6301
2019-12-04 15:30:45 -03: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
Bruno Oliveira
172b82875a
Ensure cache supporting files still exist after --cache-clear
...
Fix #6290
2019-12-01 10:36:47 -03: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
Anthony Sottile
209d99102d
Merge pull request #6234 from asottile/remove_none_warning
...
Revert "A warning is now issued when assertions are made for `None`"
2019-11-26 13:04:42 -08:00
Bruno Oliveira
05008f6b55
Preparing release version 5.3.1
2019-11-25 14:32:37 -03:00
Claudio Madotto
91b3ff1bb7
Create changelog file and update AUTHORS
2019-11-25 12:59:03 +01:00
Ronny Pfannschmidt
c99c7d0f95
deprecate direct node construction and introduce Node.from_parent
2019-11-23 21:54:11 +01:00
Bruno Oliveira
886b8d27c6
Merge pull request #5984 from phloose/acceptance-tests_pytest-dev/pytest/#4445
...
Add acceptance tests for "config warnings" stacklevel (#4445 )
2019-11-22 19:45:41 -03:00
Daniel Hahler
b0ebcfb785
pytester: remove special handling of env during inner runs
...
Closes https://github.com/pytest-dev/pytest/issues/6213 .
2019-11-22 21:50:31 +01:00
Nikolay Kondratyev
5e097970df
Fix line detection for properties in doctest tests
...
Co-Authored-By: Daniel Hahler <github@thequod.de>
2019-11-22 23:50:20 +03:00
Philipp Loose
a02310a140
Add stacklevel tests for warnings, 'location' to pytest_warning_captured
...
Resolves #4445 and #5928 (thanks to allanlewis)
Add CHANGELOG for location parameter
2019-11-22 17:50:00 -03:00
Daniel Hahler
0601f5cdad
Merge pull request #6261 from blueyed/stats-keys
...
terminal: _get_main_color: help pytest-parallel
2019-11-22 17:12:33 +01:00
Daniel Hahler
1f736a663d
terminal: _get_main_color: help pytest-parallel
...
Use `dict.keys()` to work around `__iter__` not working with a
multiprocessing DictProxy.
Ref: https://github.com/python/cpython/pull/17333
Fixes https://github.com/pytest-dev/pytest/issues/6254 .
Ref: https://github.com/browsertron/pytest-parallel/issues/36
2019-11-22 05:48:10 +01:00
Daniel Hahler
2344982d7f
main: wrap_session: handle exit.Exception with notify_exception
...
Fixes https://github.com/pytest-dev/pytest/issues/6257 .
Via https://github.com/blueyed/pytest/pull/132 .
2019-11-21 22:50:33 +01:00
Daniel Hahler
df0c652333
Merge master into features
2019-11-21 20:31:52 +01:00
Mark Dickinson
82424c9270
Fix reST markup.
2019-11-21 13:37:17 +00:00
Mark Dickinson
dbb8c146f0
Use proper reST attribute markup.
2019-11-21 13:22:34 +00:00
Mark Dickinson
9d1082bd30
Add changelog file.
2019-11-21 13:13:36 +00:00
Daniel Hahler
ed012c808a
Merge pull request #6174 from blueyed/ids-iter
...
parametrized: ids: support generator/iterator
2019-11-21 00:37:25 +01:00
Daniel Hahler
2d449e95e4
Respect --fulltrace with collection errors
2019-11-20 23:35:33 +01:00
Daniel Hahler
2c941b5d13
parametrized: ids: support generator/iterator
...
Fixes https://github.com/pytest-dev/pytest/issues/759
- Adjust test_parametrized_ids_invalid_type, create list to convert tuples
Ref: https://github.com/pytest-dev/pytest/issues/1857#issuecomment-552922498
- Changelog for int to str conversion
Ref: https://github.com/pytest-dev/pytest/issues/1857#issuecomment-552932952
2019-11-20 19:02:17 +01:00
Daniel Hahler
2228ccbfb4
pytester: reset log output in _match_lines ( #70 )
...
This is necessary for when using e.g. `no_fnmatch_line` after it.
Factor it out into `_fail`.
(cherry picked from commit aade7ed0045ba32557ef8565cbab28a2c91053a7)
Ref: https://github.com/pytest-dev/pytest/pull/5914#issuecomment-549182242
2019-11-20 05:24:18 +01:00
Bruno Oliveira
7e5ad31428
Merge features into master after 5.3 ( #6236 )
...
Merge features into master after 5.3
2019-11-19 19:17:06 -03:00
Bruno Oliveira
5b3867fd65
Release 5.3.0 ( #6233 )
...
Release 5.3.0
2019-11-19 18:49:14 -03:00
Bruno Oliveira
36ef545b2d
Improve instructions on how to write CHANGELOG entries
...
This makes easier for contributors to get the CHANGELOG entry
right the first time.
2019-11-19 14:15:55 -03:00
Anthony Sottile
faea273c93
Revert "A warning is now issued when assertions are made for `None`"
2019-11-19 08:24:08 -08:00
Bruno Oliveira
4b16b93cf5
Preparing release version 5.3.0
2019-11-19 12:43:51 -03:00
Bruno Oliveira
21622d0df4
Merge remote-tracking branch 'upstream/master' into release-5.3.0
2019-11-19 12:42:11 -03:00
Daniel Hahler
4ad61cbcf6
Improve check for misspelling of parametrize
...
- there is no need to do this with `--strict-markers`
- it can be done when looking up marks, instead of for every generated
test
2019-11-19 16:05:52 +01:00
Anthony Sottile
eeeb19626b
Merge pull request #6202 from linw1995/fix_getmodpath
...
Fix incorrect result of getmodpath method.
2019-11-18 15:14:52 -08: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
JoshKarpel
6dfd683a0c
changelog entry for #2049
2019-11-17 16:47:09 -06:00
Anthony Sottile
a2d48332fc
Merge pull request #6201 from asottile/mm
...
Merge master into features
2019-11-17 11:30:51 -08:00
Daniel Hahler
786d839db1
cacheprovider: set: use json.dumps + write
...
``json.dump`` is slower since it iterates over chunks [1].
For 100 ``cache.set`` calls this saved ~0.5s (2.5s => 2s), using a dict
with 1500 entries, and an encoded size of 500kb.
Python 3.7.4.
1: https://github.com/blueyed/cpython/blob/1c2e81ed00/Lib/json/__init__.py#L177-L180
2019-11-16 17:40:56 +01:00
林玮
329f56ecec
Fix incorrect result of getmodpath method.
2019-11-16 15:28:04 +08:00
Anthony Sottile
cc78444c30
Merge remote-tracking branch 'origin/master' into mm
2019-11-15 15:26:57 -08:00
Anthony Sottile
c9a96cdee8
Preparing release version 5.2.4
2019-11-15 13:26:56 -08:00
Anthony Sottile
4e0f99260d
Add regression tests for __init__.py breakage
2019-11-15 13:19:31 -08:00
Bruno Oliveira
d2ea9e2db5
Remove report_log in favor of pytest-reportlog
...
Fix #6180
2019-11-14 19:47:26 -03:00
Bruno Oliveira
5e8c47faad
Preparing release version 5.2.3
2019-11-14 11:12:06 -03:00
Bruno Oliveira
6f2c0fd2e8
Show a better message when 'request' is used in parametrize
...
Fix #6183
2019-11-13 19:57:10 -03:00
Bruno Oliveira
2a67637acc
Issue a warning to prepare change of 'junit_family' default value
...
Fix #6179
2019-11-13 19:55:13 -03:00
Daniel Hahler
f91bf48a40
Merge pull request #6176 from blueyed/assertoutcome
...
pytester: Hookrecorder: improve assertoutcome
2019-11-13 19:27:18 +01:00
Daniel Hahler
b06f33f474
terminal: report ``session.shouldfail`` reason (``-x``)
...
Via https://github.com/blueyed/pytest/pull/108 .
2019-11-13 16:18:41 +01:00
Daniel Hahler
6ddf7c3d42
pytester: Hookrecorder: improve assertoutcome
...
Before:
def assertoutcome(self, passed: int = 0, skipped: int = 0, failed: int = 0) -> None:
realpassed, realskipped, realfailed = self.listoutcomes()
assert passed == len(realpassed)
> assert skipped == len(realskipped)
E assert 1 == 0
E + where 0 = len([])
After:
> reprec = testdir.inline_run(testpath, "-s")
E AssertionError: ([], [], [<TestReport 'nodeid' when='call' outcome='failed'>])
E assert {'failed': 1, 'passed': 0, 'skipped': 0} == {'failed': 0, 'passed': 0, 'skipped': 1}
2019-11-13 13:48:20 +01:00
Daniel Hahler
04f27d4eb4
unittest: do not use TestCase.debug() with `--pdb`
...
Fixes https://github.com/pytest-dev/pytest/issues/5991
Fixes https://github.com/pytest-dev/pytest/issues/3823
Ref: https://github.com/pytest-dev/pytest-django/issues/772
Ref: https://github.com/pytest-dev/pytest/pull/1890
Ref: https://github.com/pytest-dev/pytest-django/pull/782
- inject wrapped testMethod
- adjust test_trial_error
- add test for `--trace` with unittests
2019-11-10 00:21:51 +01:00
Bruno Oliveira
c16b121594
Add CHANGELOG for #6152
2019-11-08 10:52:04 -03:00
Bruno Oliveira
6ad95716da
add --co option to collect-only ( #6116 )
...
add --co option to collect-only
2019-11-07 19:03:32 -03:00
Daniel Hahler
09709bba06
Use atomicrewrites only on Windows ( #6148 )
2019-11-07 22:13:26 +01:00
Daniel Hahler
40626f48e7
Update changelog/6148.improvement.rst
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2019-11-07 22:13:03 +01:00
Bruno Oliveira
7ed33996f1
on_rm_rf_error: ignore os.open (no warning) ( #6074 )
...
on_rm_rf_error: ignore os.open (no warning)
2019-11-07 18:06:05 -03:00
NNRepos
4946cc8282
Add --co option to collect-only
...
Fix #5845
2019-11-07 17:50:27 -03:00
Daniel Hahler
45c4a8fb3d
Use atomicrewrites only on Windows
...
Fixes https://github.com/pytest-dev/pytest/issues/6147
2019-11-07 20:57:45 +01:00
Daniel Hahler
2adc84ed6c
changelog
2019-11-07 12:55:01 +01:00
Daniel Hahler
ab101658f0
saferepr: handle BaseExceptions ( #6047 )
2019-11-07 12:33:22 +01:00
Daniel Hahler
b268463243
Merge master into features ( #6111 )
2019-11-07 12:31:33 +01:00
Daniel Hahler
eb7a4e32ad
saferepr: handle BaseExceptions
...
This causes INTERNALERRORs with pytest-django, which uses
`pytest.fail` (derived from `BaseException`) to prevent DB access, when
pytest then tries to e.g. display the `repr()` for a Django `QuerySet`
etc.
Ref: https://github.com/pytest-dev/pytest-django/pull/776
2019-11-06 22:08:10 +01:00
Bruno Oliveira
85288b5321
fix bug with nonskipped first test in package ( #5831 )
...
fix bug with nonskipped first test in package
2019-11-06 16:06:46 -03:00
Bruno Oliveira
74f4ec5986
Making it possible to access the pluginmanager in the pytest_ad… ( #6106 )
...
Making it possible to access the pluginmanager in the pytest_addoptio…
2019-11-06 15:18:59 -03:00
Daniel Hahler
4e45472405
Merge master into features
...
Conflicts:
src/_pytest/debugging.py
2019-11-06 14:22:07 +01:00
Daniel Hahler
01769b141a
Merge pull request #6100 from blueyed/fix-skip-offset
...
terminal: fix line offset with skip reports
2019-11-06 13:29:40 +01:00
Daniel Hahler
e7320c6b54
Merge pull request #5926 from AtakamaLLC/optional-multiline
...
Add log-auto-indent option to control multiline formatting
2019-11-06 00:35:24 +01:00
MarcoGorelli
0d79061432
Color percentage indicator according to color of final line
...
indicate current outcome/status with color of percentage indicator
Fix type annotation, refactor _write_progress_information_filling_space
Keep code in _get_main_color as similar as possible to how it was before
Write test
Make black-compliant
Fix error in newly introduced test_collecterror
Make tests more readable by using constants and f-strings
Remove accidentally added monkeypatch
Make Python 3.5-compatible, add changelog entry
Add newline at the end of changelog file
2019-11-04 19:57:07 +00:00
Daniel Hahler
3fb969897a
Merge pull request #6059 from blueyed/collect-error-short-summary
...
terminal: report collection errors as "ERROR" in short summary
2019-11-02 15:34:12 +01:00
Bruno Oliveira
0947ecd6f0
Change 5924 and 5936 changelog entries to improvement ( #6065 )
...
Change 5924 and 5936 changelog entries to improvement
2019-11-02 11:23:06 -03:00
David Szotten
285524c6cd
Fix --trace for parametrized tests
...
Without this, the second time it tries to stop in a parametrized
function it raises instead:
`ValueError: --trace can't be used with a fixture named func!`
Implementation idea, test (and changelog tweaks) thanks to blueyed
Co-Authored-By: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Co-Authored-By: Daniel Hahler <git@thequod.de>
2019-10-31 21:41:33 +00:00
Joshua Storck
0027908e9e
Removing :py:func: and :ref: from changelog as it's not supported by towncrier
2019-10-30 15:02:18 -04:00
Joshua Storck
7a96d94fd4
Making it possible to access the pluginmanager in the pytest_addoption hook
2019-10-30 14:18:13 -04:00
Bruno Oliveira
b99661b9d7
Introduce --report-log option
...
Fix #4488
2019-10-30 09:43:33 -03:00
Daniel Hahler
6d2cabae57
terminal: fix line offset with skip reports
...
The original fix in https://github.com/pytest-dev/pytest/pull/2548 was
wrong, and was likely meant to fix the use with decorators instead,
which this does now (while reverting 869eed9898
).
2019-10-29 13:11:02 +01:00
Daniel Hahler
cdc53da19c
Merge pull request #5990 from MarcoGorelli/plurality-matching
...
Plurality matching
2019-10-28 17:03:15 +01:00
MarcoGorelli
d863c30c74
Fix plurality mismatch for and in pytest terminal summary
2019-10-27 15:16:24 +00:00
Daniel Hahler
8e8a8fa4b9
pytester: spawn: do not skip FreeBSD
...
Fixes https://github.com/pytest-dev/pytest/issues/6069
2019-10-27 00:44:25 +02:00
Bruno Oliveira
928587da60
Change 5924 and 5936 changelog entries to improvement [ci skip]
2019-10-26 13:02:47 -03:00
Bruno Oliveira
f93f284356
Support sys.pycache_prefix on py38
...
Fix #4730
2019-10-26 10:17:21 -03:00
Kale Kundert
b9df9a4761
Merge pull request #6058 from AnjoMan/6057-tolerance-on-complex-approx
...
6057 tolerance on complex approx
2019-10-25 15:31:47 -04:00
Michael Krebs
1f5b454355
Add log-auto-indent option to control multiline formatting
2019-10-25 11:31:33 -04:00
Daniel Hahler
82753bec50
terminal: report collection errors as "ERROR" in short summary
2019-10-25 07:03:32 +02:00
AnjoMan
ed9fda84d3
Add tolerance to complex numbers
2019-10-24 23:44:13 -04:00
Bruno Oliveira
fb0e8b99d1
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
- src/_pytest/cacheprovider.py
2019-10-24 21:13:43 -03:00
Bruno Oliveira
b27ba97721
Preparing release version 5.2.2
2019-10-24 19:24:04 -04:00
Bruno Oliveira
d1bc2601e4
pytester: align prefixes ( #6026 )
...
pytester: align prefixes
2019-10-24 18:50:29 -03:00
Daniel Hahler
8ef4287bf0
pytester: align prefixes
...
This is important for using another match_nickname, e.g. "re.match".
TODO:
- [ ] changelog
- [ ] test
2019-10-24 23:20:12 +02:00
Bruno Oliveira
92418b8d5d
Change #5061 changelog to 'improvement'
2019-10-23 21:27:07 -03:00
Bruno Oliveira
432e5550e5
assertrepr_compare: use safeformat with -vv ( #5936 )
...
assertrepr_compare: use safeformat with -vv
2019-10-23 19:51:40 -03:00
Bruno Oliveira
20ee883b5f
Show the mnemonic of pytest.ExitCode in RunResult's repr ( #6043 )
...
Show the mnemonic of pytest.ExitCode in RunResult's repr
2019-10-23 10:46:58 -03:00
Bruno Oliveira
7beb520555
Show the mnemonic of pytest.ExitCode in RunResult's repr
...
Fix #4901
2019-10-23 09:16:02 -03:00
Bruno Oliveira
ba4b8c869c
Review rm_rf handling of FileNotFoundErrors
2019-10-23 08:30:52 -03:00
Daniel Hahler
db9e248b2e
Merge pull request #6039 from blueyed/test_doctest_id
...
doctest: unset RUNNER_CLASS in pytest_unconfigure
2019-10-23 11:38:59 +02:00
Daniel Hahler
046aa0b6e9
pytest.main: return ExitCode
2019-10-23 04:33:05 +02:00
Daniel Hahler
4af89bba9d
Merge pull request #5061 from blueyed/summary_stats-multi-color
...
Multiple colors with terminal summary_stats
2019-10-23 03:21:39 +02:00
Daniel Hahler
5e7b2ae704
doctest: pytest_unconfigure: reset RUNNER_CLASS
...
This is important when used with ``pytester``'s ``runpytest_inprocess``.
Since 07f20ccab
`pytest testing/acceptance_test.py -k test_doctest_id`
would fail, since the second run would not consider the exception to be
an instance of `doctest.DocTestFailure` anymore, since the module was
re-imported, and use another failure message then in the short test
summary info (and in the report itself):
> FAILED test_doctest_id.txt::test_doctest_id.txt - doctest.DocTestFailure: <Do...
while it should be:
> FAILED test_doctest_id.txt::test_doctest_id.txt
2019-10-23 03:09:41 +02:00
Daniel Hahler
82e9013e73
Merge pull request #6004 from blueyed/fix-nf
...
cache: NFPlugin: keep known nodeids
2019-10-23 01:04:48 +02:00
Bruno Oliveira
a51bb3eedb
Add CHANGELOG for #5630
2019-10-22 19:43:42 -03:00
Daniel Hahler
554dba391c
Multiple colors with terminal summary_stats
...
Ref: https://github.com/pytest-dev/pytest/issues/5060
2019-10-21 04:35:45 +02:00
Daniil Galiev
9275012ef7
fix bug with nonskipped first test in package
2019-10-21 00:11:24 +02:00
Daniel Hahler
803cc1f294
Merge master into features
2019-10-21 00:08:03 +02:00
Daniel Hahler
d91ff0af8a
assertrepr_compare: use safeformat with -vv
2019-10-20 20:51:03 +02:00
Bruno Oliveira
d12cdd3127
Make InvocationParams.args a tuple
...
This avoids mutating the original list to reflect on InvocationParams,
which is supposed to be an immutable snapshot of the state of pytest.main()
at the moment of invocation (see pytest-dev/pytest-xdist#478 ).
2019-10-19 16:42:58 -03:00
Yoav Caspi
e05b33ed16
setuponly: remove printing out/err from capman
2019-10-19 22:33:19 +03:00
Daniel Hahler
3173a26388
cache: NFPlugin: keep known nodeids
...
Caveat: does not forget about old nodeids
Fixes https://github.com/pytest-dev/pytest/issues/5206
2019-10-19 04:53:01 +02:00
Daniel Hahler
0976e2f50d
Merge master into features
2019-10-18 17:51:42 +02:00
Victor Maryama
63e3d89647
Fixed linting.
2019-10-12 15:08:47 +02:00
Victor Maryama
122748a6cf
Added changelog file.
2019-10-12 14:38:58 +02:00
Daniel Hahler
946434c610
Improve full diff output for lists
...
Massage text input for difflib when comparing pformat output of
different line lengths.
Also do not strip ndiff output on the left, which currently already
removes indenting for lines with no differences.
Before:
E AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...]
E Right contains 3 more items, first extra item: ' '
E Full diff:
E - ['version', 'version_info', 'sys.version', 'sys.version_info']
E + ['version',
E + 'version_info',
E + 'sys.version',
E + 'sys.version_info',
E + ' ',
E + 'sys.version',
E + 'sys.version_info']
After:
E AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...]
E Right contains 3 more items, first extra item: ' '
E Full diff:
E [
E 'version',
E 'version_info',
E 'sys.version',
E 'sys.version_info',
E + ' ',
E + 'sys.version',
E + 'sys.version_info',
E ]
2019-10-08 15:27:51 +02:00
Bruno Oliveira
0c18e24433
Introduce no_fnmatch_line/no_re_match_line in pytester
...
The current idiom is to use:
assert re.match(pat, result.stdout.str())
Or
assert line in result.stdout.str()
But this does not really give good results when it fails.
Those new functions produce similar output to ther other match lines functions.
2019-10-06 18:05:24 -03:00
Bruno Oliveira
068ef90b92
Preparing release version 5.2.0
2019-09-28 21:18:37 -04:00
Bruno Oliveira
7bdfba3578
Fix --setup-only and --setup-show for custom pytest items
...
Fix #5884
2019-09-28 11:52:09 -03:00
Daniel Hahler
409cc2946a
Merge master into features
2019-09-21 16:22:48 +02:00
Bruno Oliveira
1a9f4a51cb
Preparing release version 5.1.3
2019-09-18 10:11:59 -03:00
Bruno Oliveira
6918d07560
Merge remote-tracking branch 'upstream/features' into aklajnert/1682-dynamic-scope
2019-09-18 07:44:18 -03:00
Daniel Hahler
450409d123
Merge master into features
...
Conflicts:
src/_pytest/reports.py
(via 7259c453d
, moved the type annotation; setting it to `None`
was removed in 3c82b1cb9
already)
2019-09-17 12:46:36 +02:00
Daniel Hahler
702acdba46
Merge pull request #5811 from blueyed/fulltrace-pytest-raises
...
Handle --fulltrace with pytest.raises
2019-09-14 02:09:36 +02:00
Daniel Hahler
f832ac3316
Handle --fulltrace with pytest.raises
...
This changes `_repr_failure_py` to use `tbfilter=False` always.
2019-09-14 01:41:43 +02:00
Bruno Oliveira
5c3b4a6f52
Add CHANGELOG entry for #5792
2019-09-12 08:05:50 -03:00
Anthony Sottile
9d7b919c7d
Fix pypy3.6 on windows
2019-09-07 16:49:05 -07:00
aklajnert
10bf6aac76
Implemented the dynamic scope feature.
2019-08-31 18:12:24 +02:00
Michael Goerz
f8dd6349c1
Fix "lexer" being used when uploading to bpaste.net
...
Closes #5806 .
2019-08-30 15:34:03 -04:00
Bruno Oliveira
e56544cb58
Preparing release version 5.1.2
2019-08-30 12:43:47 -03:00
Bruno Oliveira
bd57307a39
Merge pull request #5768 from robholt/fixture-class-instance
...
Fix self reference in function scoped fixtures
2019-08-30 12:31:16 -03:00
Bruno Oliveira
4e594552eb
Merge pull request #5798 from aklajnert/570-indirect-fixtures
...
Fix the scope behavior with indirect fixtures
2019-08-30 12:29:03 -03:00
Bruno Oliveira
955dc6d18a
Merge remote-tracking branch 'upstream/master' into robholt/fixture-class-instance
2019-08-30 11:21:33 -03:00
Bruno Oliveira
3ddbc7fb2a
Improve CHANGELOG and add some comments
...
Ref: #5768
2019-08-30 11:20:19 -03:00
Bruno Oliveira
35b3b1097f
Improve CHANGELOG and make test easier to understand for #570
2019-08-30 10:54:58 -03:00
Bruno Oliveira
01082fea12
Serialize/deserialize chained exceptions ( #5787 )
...
Serialize/deserialize chained exceptions
2019-08-30 07:29:48 -03:00
Bruno Oliveira
a511b98da9
Serialize/deserialize chained exceptions
...
Fix #5786
2019-08-29 20:23:44 -03:00
Andrzej Klajnert
487659d8b1
Fix the scope behavior with indirect fixtures.
2019-08-29 07:23:08 +02:00
Christian Neumüller
a98270eac0
Document the bugfix.
2019-08-27 16:36:40 +02:00
Michael Goerz
d47b9d04d4
Gracefully handle HTTP errors from pastebin
...
We find that the --pastebin option to pytest sometimes fails with "HTTP
Error 400: Bad Request". We're still investigating the exact cause of
these errors, but in the meantime, a failure to upload to the pastebin
service should probably not crash pytest and cause a test failure in the
continuous-integration.
This patch catches exceptions like HTTPError that may be thrown while
trying to communicate with the pastebin service, and reports them as a
"bad response", without crashing with a backtrace or failing the entire
test suite.
2019-08-26 23:50:46 -04:00
Bruno Oliveira
c28e428249
Merge remote-tracking branch 'upstream/master' into mm
2019-08-26 20:00:30 -03:00
Bruno Oliveira
1c7aeb670a
Fix linting
2019-08-24 15:01:48 -03:00
linchiwei123
a4adf511fc
Fix TypeError
...
can only concatenate str (not "bytes") to str
2019-08-24 23:10:17 +08:00
Anthony Sottile
b135f5af8d
Preparing release version 5.1.1
2019-08-20 11:30:36 -07:00
Robert Holt
62381125e7
Fix self reference in function scoped fixtures
2019-08-19 15:57:39 -04:00
Daniel Hahler
2a6a1ca07d
Inject width via pylib to argparse formatter
...
`argparse.HelpFormatter` looks at `$COLUMNS` only, falling back to a
default of 80.
`py.io.get_terminal_width()` is smarter there, and could even work
better with https://github.com/pytest-dev/py/pull/219 .
This ensures to use a consistent value for formatting the ini values etc.
2019-08-17 16:51:02 +02:00
Ran Benita
9f3bfe82cf
Fix TypeError when importing pytest on Python 3.5.0 and 3.5.1
...
The typing module on these versions have these issues:
- `typing.Pattern` cannot appear in a Union since it is not considered a
class.
- `@overload` is not supported in runtime. (On the other hand, mypy
doesn't support putting it under `if False`, so we need some runtime
hack).
Refs #5751 .
2019-08-17 15:41:59 +03:00
Bruno Oliveira
eaf7ce9a99
Preparing release version 5.1.0
2019-08-15 20:00:09 -04:00
Bruno Oliveira
d7f082519a
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
src/_pytest/outcomes.py
2019-08-15 10:03:52 -03:00
Bruno Oliveira
28c6c5bb71
check that tests that are partial staticmethods are supported ( #5701 )
...
check that tests that are partial staticmethods are supported
2019-08-15 09:12:01 -03:00
Bruno Oliveira
0ba774a7c3
warn for async generator functions ( #5734 )
...
warn for async generator functions
2019-08-15 08:17:12 -03:00
Thomas Grainger
137255816e
Fix collection of staticmethods defined with functools.partial
...
Related to #5701
2019-08-15 08:04:05 -03:00
Thomas Grainger
2f1b192fe6
Issue a warning for async gen functions
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2019-08-15 07:54:10 -03:00
dmitry.dygalo
7183335e62
Capture warnings during ``pytest_configure``
...
Fix #5115
2019-08-15 07:50:27 -03:00
Bruno Oliveira
345df99db7
Show session duration in human-readable format
...
Fix #5707
2019-08-10 10:45:53 -03:00
Bruno Oliveira
beb457c75e
Add new 'improvement' changelog category
...
This creates a separate section from 'features' for small changes which
don't usually require user intervention, such as:
* Human readable session duration
* New junitxml fields
* Improved colors in terminal
* etc.
The idea is to better match user expectations about new actual
features in the "Features" section of the changelog.
2019-08-10 09:33:51 -03:00
martbln
e0ce8b79d5
pytester: add docstrings for Testdir.copy_example
2019-08-10 00:59:14 +03:00
Bruno Oliveira
ba76080b59
Validate xunit2 files against the schema
...
Fix #5095
2019-08-09 10:55:06 -03:00
Daniel Hahler
aa06e6c8f3
Merge master into features
2019-08-05 19:12:32 +02:00
Daniel Hahler
198fcd8a6f
Fix RuntimeError when trying to collect package with "__init__.py" only
...
Fixes https://github.com/pytest-dev/pytest/issues/4344 .
2019-08-05 17:52:21 +02:00
Bruno Oliveira
cf6632a57a
Rename 5471.trivial.rst to 5471.feature.rst
2019-08-05 10:19:05 -03:00