summaryrefslogtreecommitdiff
path: root/changelog
AgeCommit message (Collapse)Author
2020-09-12Merge pull request #7745 from asottile/exec_globals_type_problemBruno Oliveira
Fix INTERNALERROR when accessing locals / globals with faulty `exec`
2020-09-12Merge pull request #7736 from nicoddemus/extend-fixture-parametrize-1953Bruno Oliveira
2020-09-11Fix INTERNALERROR when accessing locals / globals with faulty `exec`Anthony Sottile
2020-09-12Merge pull request #7720 from pytest-dev/release-6.0.2Ran Benita
Prepare release 6.0.2 (cherry picked from commit fe69bd5baf6b8d1713e16caffc7a5e8dab63bc0f)
2020-09-11Allow ovewriting a parametrized fixture while reusing the parent fixture's valueBruno Oliveira
Fix #1953
2020-09-05Make min duration configurable for slowest tests (#7667)Sorin Sbarnea
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-04Merge pull request #7685 from bluetech/py-to-pathlib-2Ran Benita
config: start migrating Config.{rootdir,inifile} from py.path.local to pathlib
2020-09-04Merge pull request #7708 from nicoddemus/repr-line-7707Bruno Oliveira
Fix handle of exceptions in ReprEntry with tb=line
2020-09-04config: add Config.{rootpath,inipath}, turn Config.{rootdir,inifile} to ↵Ran Benita
properties
2020-09-04Integrate warnings filtering directly into Config (#7700)Bruno Oliveira
Warnings are a central part of Python, so much that Python itself has command-line and environtment variables to handle warnings. By moving the concept of warning handling into Config, it becomes natural to filter warnings issued as early as possible, even before the "_pytest.warnings" plugin is given a chance to spring into action. This also avoids the weird coupling between config and the warnings plugin that was required before. Fix #6681 Fix #2891 Fix #7620 Fix #7626 Close #7649 Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-09-03Fix handle of exceptions in ReprEntry with tb=lineBruno Oliveira
Fix #7707
2020-08-26python: skip pytest_pycollect_makeitem work on certain namesRan Benita
When a Python object (module/class/instance) is collected, for each name in `obj.__dict__` (and up its MRO) the pytest_pycollect_makeitem hook is called for potentially creating a node for it. These Python objects have a bunch of builtin attributes that are extremely unlikely to be collected. But due to their pervasiveness, dispatching the hook for them ends up being mildly expensive and also pollutes PYTEST_DEBUG=1 output and such. Let's just ignore these attributes. On the pandas test suite commit 04e9e0afd476b1b8bed930e47bf60e, collect only, irrelevant lines snipped, about 5% improvement: Before: ``` 51195095 function calls (48844352 primitive calls) in 39.089 seconds ncalls tottime percall cumtime percall filename:lineno(function) 226602/54 0.145 0.000 38.940 0.721 manager.py:90(_hookexec) 72227 0.285 0.000 20.146 0.000 python.py:424(_makeitem) 72227 0.171 0.000 16.678 0.000 python.py:218(pytest_pycollect_makeitem) ``` After: ``` 48410921 function calls (46240870 primitive calls) in 36.950 seconds ncalls tottime percall cumtime percall filename:lineno(function) 181429/54 0.113 0.000 36.777 0.681 manager.py:90(_hookexec) 27054 0.130 0.000 17.755 0.001 python.py:465(_makeitem) 27054 0.121 0.000 16.219 0.001 python.py:218(pytest_pycollect_makeitem) ```
2020-08-25python: fix empty parametrize() leading to "NotSetType.token" idRan Benita
In ff8b7884e8f1019f60f270eab2c4909ff557dd4e NOTSET was changed to a singleton enum, which ended up unexpectedly triggering a code path in ID generation which checks for `isinstance(Enum)`. Add an explicit case for it, which is not too bad anyway.
2020-08-24Merge pull request #7651 from bluetech/capture-safe-disableRan Benita
capture: fix disabled()/global_and_fixture_disabled() enabling capturing when it was disabled
2020-08-23Merge pull request #7673 from bluetech/logging-fix-handler-restoreRan Benita
logging: fix handler level restored incorrectly if caplog.set_level is called more than once
2020-08-22logging: fix handler level restored incorrectly if caplog.set_level is ↵Ran Benita
called more than once
2020-08-22Reintroduce warnings postponed in 6.0 (#7637)Maximilian Cosmo Sitter
2020-08-19Remove resultlog pluginBruno Oliveira
2020-08-19Add bottom changelog deprecation noticeBruno Oliveira
2020-08-19Remove deprecated TerminalReporter.writer propertyBruno Oliveira
2020-08-19Change junit_family default to xunit2Bruno Oliveira
2020-08-19Hard failure when constructing Node subclassesBruno Oliveira
2020-08-19Drop support for positional arguments in @pytest.fixtureBruno Oliveira
2020-08-19Remove funcargnames compatibility propertyBruno Oliveira
2020-08-18Merge pull request #7648 from bluetech/pylint-abc2Ran Benita
Only define gethookproxy, isinitpath on Session
2020-08-17Merge pull request #7643 from nicoddemus/issue-7628Bruno Oliveira
2020-08-16capture: fix disabled()/global_and_fixture_disabled() enabling capturing ↵Ran Benita
when it was disabled The `CaptureManager.global_and_fixture_disabled()` context manager (and `CaptureFixture.disabled()` which calls it) did `suspend(); ...; resume()` but if the capturing was already suspended, the `resume()` would resume it when it shouldn't. This caused caused some messages to be swallowed when `--log-cli` is used because it uses `global_and_fixture_disabled` when capturing is not necessarily resumed.
2020-08-15Fix Module.name from full path without drive letterBruno Oliveira
Fix #7628
2020-08-15Merge pull request #7639 from nicoddemus/issue-7638Bruno Oliveira
2020-08-15Only define gethookproxy, isinitpath on SessionRan Benita
This fixes an issue where pylint complains about missing implementations of abstract methods in subclasses of `File` which only override `collect()` (as they should). It is also cleaner and makes sense, these methods really don't need to be overridden. The previous methods defined directly on `FSCollector` and `Package` are deprecated, to be removed in pytest 7. See commits e2934c3f8c03c83469f4c6670c207773a6e02df4 and f10ab021e21a44e2f0fa2be66660c4a6d4b7a61a for reference.
2020-08-14Add changelog for PR #7631Ran Benita
2020-08-12get_dirs_from_args handles paths with invalid syntaxBruno Oliveira
Fix #7638
2020-08-12Remove faq.rst from docs (#7635)Maximilian Cosmo Sitter
2020-08-01Merge pull request #7586 from nicoddemus/cp-releaseBruno Oliveira
Merge pull request #7584 from pytest-dev/release-6.0.1
2020-07-30Stop using more-itertoolsRan Benita
We barely use it; the couple places that do are not really worth the extra dependency, I think the code is clearer without it. Also simplifies one (regular) itertools usage. Also improves a check and an error message in `pytest.raises`.
2020-07-30Merge pull request #7584 from pytest-dev/release-6.0.1Bruno Oliveira
Prepare release 6.0.1 (cherry picked from commit 022bff27a71406bd5dc4794d34f1fbbf56a45250)
2020-07-30Add missing changelog for issue 7569Ran Benita
2020-07-29Merge remote-tracking branch 'upstream/6.0.x' into ↵Bruno Oliveira
fix-changelog-entries-release-process
2020-07-29Merge pull request #7561 from nicoddemus/longreprtext-7559Bruno Oliveira
2020-07-29Merge pull request #7561 from nicoddemus/longreprtext-7559Bruno Oliveira
2020-07-29Fix TestReport.longreprtext when TestReport.longrepr is not a stringBruno Oliveira
Fix #7559
2020-07-29Merge pull request #7536 from bluetech/junitxml-etreeRan Benita
junitxml: convert from py.xml to xml.etree.ElementTree
2020-07-29Merge pull request #7565 from bluetech/pylint-callable-2Ran Benita
mark: fix pylint not-callable error on pytest.mark.parametrize(...), again (cherry picked from commit f9837f953c03268baa4ae8e9803cb3a13ec6860c)
2020-07-29Merge pull request #7565 from bluetech/pylint-callable-2Ran Benita
mark: fix pylint not-callable error on pytest.mark.parametrize(...), again
2020-07-29junitxml: convert from py.xml to xml.etree.ElementTreeRan Benita
Part of the effort to reduce dependency on the py library. Besides that, py.xml implements its own XML serialization which is pretty scary. I tried to keep the code with minimal changes (though it could use some cleanups). The differences in behavior I have noticed are: - Attributes in the output are not sorted. - Some unneeded escaping is no longer performed, for example escaping `"` to `&quot;` in a text node.
2020-07-29Fix --help crash on add_ini(.., help='') and improve message on help=None ↵hp310780
(#7427)
2020-07-29mark: fix pylint not-callable error on pytest.mark.parametrize(...), againRan Benita
Apparently the previous fix c1ca42b5c264b4ea1b4591bc12e0 didn't work. Hopefully this time I'm testing this correctly.
2020-07-28Prepare release version 6.0.0pytest bot
2020-07-24Revert change to traceback repr (#7535)Zac Hatfield-Dodds
* Revert change to traceback repr * Add test and changelog entry * Restore *exact* prev output Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-22Change pytest deprecation warnings into errors for 6.0 release (#7362)Bruno Oliveira
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>