Age | Commit message (Collapse) | Author |
|
Bugfix 5430 pass logs to junit report
|
|
Fix #6301
|
|
Fix #6290
|
|
Revert "A warning is now issued when assertions are made for `None`"
|
|
tests failed not in a teardown phase
|
|
Co-Authored-By: Daniel Hahler <github@thequod.de>
|
|
Fixes https://github.com/pytest-dev/pytest/issues/6257.
Via https://github.com/blueyed/pytest/pull/132.
|
|
|
|
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
|
|
Release 5.3.0
|
|
|
|
|
|
- there is no need to do this with `--strict-markers`
- it can be done when looking up marks, instead of for every generated
test
|
|
|
|
Fix incorrect result of getmodpath method.
|
|
Remove report_log in favor of pytest-reportlog
|
|
Done initially in 99015bfc8.
|
|
|
|
|
|
|
|
Merge master into features
|
|
|
|
Add type annotations to _pytest.compat and _pytest._code.code
|
|
|
|
|
|
|
|
|
|
The previous test was better in that it used fakes to test all of the
real code paths. The problem with that is that it makes it impossible to
simplify the code with `isinstance` checks. So let's just simulate the
issue directly with a monkeypatch.
|
|
|
|
pytest doesn't support these PyPy versions anymore, so no need to have
checks for them.
|
|
|
|
|
|
Setting PYTHONDONTWRITEBYTECODE in the environment does not change it
for the current process.
|
|
This is important for `isinstance` checks etc.
|
|
|
|
This reverts commit 85288b53218d4e0037dce9c34bd37f86fa9e212d, reversing
changes made to 5f9db8a01721e10162769b96b82794dd069bbaeb.
|
|
Fix #6180
|
|
Fix #6183
|
|
Fix #6179
|
|
pytester: Hookrecorder: improve assertoutcome
|
|
terminal: report ``session.shouldfail`` reason (``-x``)
|
|
Via https://github.com/blueyed/pytest/pull/108.
|
|
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}
|
|
It currently fails with a TypeError, and was not updated since 2013 -
therefore it can be assumed that it is not important to support it.
```
____________________ ERROR collecting test_nested_marks.py _____________________
…/Vcs/pluggy/src/pluggy/hooks.py:286: in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
…/Vcs/pluggy/src/pluggy/manager.py:93: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
…/Vcs/pluggy/src/pluggy/manager.py:337: in traced_hookexec
return outcome.get_result()
…/Vcs/pluggy/src/pluggy/manager.py:335: in <lambda>
outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
…/Vcs/pluggy/src/pluggy/manager.py:87: in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
…/Vcs/pytest/src/_pytest/python.py:235: in pytest_pycollect_makeitem
res = list(collector._genfunctions(name, obj))
…/Vcs/pytest/src/_pytest/python.py:404: in _genfunctions
self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
…/Vcs/pluggy/src/pluggy/hooks.py:324: in call_extra
return self(**kwargs)
…/Vcs/pluggy/src/pluggy/hooks.py:286: in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
…/Vcs/pluggy/src/pluggy/manager.py:93: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
…/Vcs/pluggy/src/pluggy/manager.py:337: in traced_hookexec
return outcome.get_result()
…/Vcs/pluggy/src/pluggy/manager.py:335: in <lambda>
outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
…/Vcs/pluggy/src/pluggy/manager.py:87: in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
…/Vcs/pytest/src/_pytest/python.py:130: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs)
…/Vcs/pytest/src/_pytest/python.py:965: in parametrize
function_definition=self.definition,
…/Vcs/pytest/src/_pytest/mark/structures.py:111: in _for_parametrize
if len(param.values) != len(argnames):
E TypeError: object of type 'MarkDecorator' has no len()
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
```
|
|
Add a @cached_property implementation
|
|
|
|
This is a useful utility to abstract the caching property idiom.
It is in compat.py since eventually it will be replaced by
functools.cached_property.
Fixes #6131.
|
|
use __name__ attribute in the parametrize id for modules as well
|
|
It is a little too obscure IMO, but the reason I want to drop it is that
type checking has no hope of understanding such dynamic constructs.
The warning argument wasn't used.
|
|
|