summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
2019-12-12Bugfix 5430 pass logs to junit report (#6274)Bruno Oliveira
Bugfix 5430 pass logs to junit report
2019-12-04Fix assertion rewriting module detection for egg distsBruno Oliveira
Fix #6301
2019-12-01Ensure cache supporting files still exist after --cache-clearBruno Oliveira
Fix #6290
2019-11-26Merge pull request #6234 from asottile/remove_none_warningAnthony Sottile
Revert "A warning is now issued when assertions are made for `None`"
2019-11-25Fix for issue #5430 - junit-xml: logs are not passed to junit report for ↵Claudio Madotto
tests failed not in a teardown phase
2019-11-22Fix line detection for properties in doctest testsNikolay Kondratyev
Co-Authored-By: Daniel Hahler <github@thequod.de>
2019-11-21main: wrap_session: handle exit.Exception with notify_exceptionDaniel Hahler
Fixes https://github.com/pytest-dev/pytest/issues/6257. Via https://github.com/blueyed/pytest/pull/132.
2019-11-21Modify test for new expected behaviourMark Dickinson
2019-11-20pytester: reset log output in _match_lines (#70)Daniel Hahler
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-19Release 5.3.0 (#6233)Bruno Oliveira
Release 5.3.0
2019-11-19Revert "A warning is now issued when assertions are made for `None`"Anthony Sottile
2019-11-19Merge remote-tracking branch 'upstream/master' into release-5.3.0Bruno Oliveira
2019-11-19Improve check for misspelling of parametrizeDaniel Hahler
- 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-18Remove check for os.symlink, always there in py3+Anthony Sottile
2019-11-18Merge pull request #6202 from linw1995/fix_getmodpathAnthony Sottile
Fix incorrect result of getmodpath method.
2019-11-18Merge pull request #6192 from nicoddemus/remove-reportlog-6180Bruno Oliveira
Remove report_log in favor of pytest-reportlog
2019-11-18Metafunc: remove hack for DefinitionMockDaniel Hahler
Done initially in 99015bfc8.
2019-11-18Hardening an existing test for demonstrating this change.林玮
2019-11-17fix whitespace issues in tests for #2049JoshKarpel
2019-11-17resolve #2049JoshKarpel
2019-11-17Merge pull request #6201 from asottile/mmAnthony Sottile
Merge master into features
2019-11-17tests: revisit test_cacheprovider (#6199)Daniel Hahler
2019-11-17Merge pull request #6205 from bluetech/type-annotations-8Ran Benita
Add type annotations to _pytest.compat and _pytest._code.code
2019-11-16test_cache_writefail_permissions: ignore any other pluginsDaniel Hahler
2019-11-16tests: revisit test_cacheproviderDaniel Hahler
2019-11-16Add type annotations to _pytest._code.codeRan Benita
2019-11-16re-run blackDaniel Hahler
2019-11-16Simplify a FormattedExcinfo testRan Benita
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.
2019-11-16Remove unneeded getrawcode() calls from testsRan Benita
2019-11-16Remove a PyPy version check for an unsupported versionRan Benita
pytest doesn't support these PyPy versions anymore, so no need to have checks for them.
2019-11-15Merge remote-tracking branch 'origin/master' into mmAnthony Sottile
2019-11-15Import Path from _pytest.pathlib for py35 (#6193)Daniel Hahler
2019-11-15tests: use sys.dont_write_bytecodeDaniel Hahler
Setting PYTHONDONTWRITEBYTECODE in the environment does not change it for the current process.
2019-11-15Import Path from _pytest.pathlib for py35Daniel Hahler
This is important for `isinstance` checks etc.
2019-11-15Add regression tests for __init__.py breakageAnthony Sottile
2019-11-15Revert "fix bug with nonskipped first test in package (#5831)"Anthony Sottile
This reverts commit 85288b53218d4e0037dce9c34bd37f86fa9e212d, reversing changes made to 5f9db8a01721e10162769b96b82794dd069bbaeb.
2019-11-14Remove report_log in favor of pytest-reportlogBruno Oliveira
Fix #6180
2019-11-13Show a better message when 'request' is used in parametrizeBruno Oliveira
Fix #6183
2019-11-13Issue a warning to prepare change of 'junit_family' default valueBruno Oliveira
Fix #6179
2019-11-13Merge pull request #6176 from blueyed/assertoutcomeDaniel Hahler
pytester: Hookrecorder: improve assertoutcome
2019-11-13Merge pull request #6181 from blueyed/maxfail-terminal-upstreamDaniel Hahler
terminal: report ``session.shouldfail`` reason (``-x``)
2019-11-13terminal: report ``session.shouldfail`` reason (``-x``)Daniel Hahler
Via https://github.com/blueyed/pytest/pull/108.
2019-11-13pytester: Hookrecorder: improve assertoutcomeDaniel Hahler
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-12tests: remove test_nested_marks (xfail)Daniel Hahler
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 !!!!!!!!!!!!!!!!!!!! ```
2019-11-10Merge pull request #6149 from bluetech/cached-propertyRan Benita
Add a @cached_property implementation
2019-11-10_compare_eq_iterable: use AlwaysDispatchingPrettyPrinter (#6151)Daniel Hahler
2019-11-10Add a @cached_property implementationRan Benita
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.
2019-11-08Merge pull request #6152 from grlee77/module_name_in_idBruno Oliveira
use __name__ attribute in the parametrize id for modules as well
2019-11-08Drop the "alias" helper used in MarkDecoratorRan Benita
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.
2019-11-08add minimal test caseGregory Lee