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