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
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
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
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
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