summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-13remove unused bitbucket linkThomas Grainger
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 #7744 from bluetech/cherry-pick-releaseRan Benita
Merge pull request #7720 from pytest-dev/release-6.0.2
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-11Use ParameterSet to extract argnames from parametrize markBruno Oliveira
2020-09-11Allow ovewriting a parametrized fixture while reusing the parent fixture's valueBruno Oliveira
Fix #1953
2020-09-11Merge pull request #7729 from bluetech/doc-fix-crossrefsRan Benita
doc: fix a few broken cross references
2020-09-09Merge pull request #7734 from pytest-dev/asottile-patch-1Bruno Oliveira
Update pytest-dev requirements
2020-09-09Add example for __test__ (#7733)Joseph Lucas
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-08Update pytest-dev requirementsAnthony Sottile
- be more vague about "packaging metadata" over explicitly mentioning `setup.py` (such that `pyproject.toml`-based distributions are allowed) - drop extensions on `README.txt` / `LICENSE.txt` (it's more common to have `.md` / `.rst` / no extension) - remove duplicate mention of license packaging metadata
2020-09-06doc: fix broken cross referencesRan Benita
2020-09-05Merge pull request #7722 from The-Compiler/update-trainingsAnthony Sottile
doc: Remove Workshoptage training
2020-09-05doc: Remove Workshoptage trainingFlorian Bruhin
The sign-up is closed.
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 #7714 from bluetech/doc-prefer-publicBruno Oliveira
doc: prefer to reference by public name when possible
2020-09-04Merge pull request #7713 from bluetech/doc-one-pmBruno Oliveira
doc/reference: include PluginManager in PytestPluginManager and remove it
2020-09-04Merge pull request #7719 from nicoddemus/fix-release-scriptBruno Oliveira
Use tox to execute release script
2020-09-04Use tox to execute release scriptBruno Oliveira
The release-on-comment script is always executed on *master*, so we should execute the `release.py` script using tox to ensure we create the right environment. Also fixed errors in the error handling code.
2020-09-04doc: prefer to reference by public name when possibleRan Benita
When a name is exported from `pytest`, prefer to refer to it by that rather than its `_pytest` import path. It is shorter and more appropriate in user-facing documentation (although that's not really visible). Our plan is to expose more names for typing purposes, in which can this could be more comprehensive.
2020-09-04doc/reference: include PluginManager in PytestPluginManager and remove itRan Benita
Before, `PluginManager` was a copy of the pluggy doc, and `PytestPluginManager` was documented separately. pytest users only really need to know about `PytestPluginManager`, so instead of splitting have the `PytestPluginManager` documentation include all of `PluginManager` members and remove `PluginManager` from the reference (it is still shown as the base class).
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-04Replace some usages of config.{rootdir,inifile} with config.{rootpath,inipath}Ran Benita
2020-09-04config: add Config.{rootpath,inipath}, turn Config.{rootdir,inifile} to ↵Ran Benita
properties
2020-09-04config: small doc improvementsRan Benita
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-28Merge pull request #7698 from bluetech/rm-scopedpropertyAnthony Sottile
fixture: remove `@scopeproperty`
2020-08-28Merge pull request #7699 from bluetech/optimize-makeitemBruno Oliveira
python: small optimization in PyCollector.collect()
2020-08-28Merge pull request #7697 from nicoddemus/file-docsBruno Oliveira
2020-08-28Add missing File reference to the docsBruno Oliveira
As related in #7696
2020-08-28fixture: remove `@scopeproperty`Ran Benita
I think the straight code is easier to understand.
2020-08-27python: small optimization in PyCollector.collect()Ran Benita
Inline `_makeitem()` so that `self.ihook` (which is moderately expensive) can be called only once. Note: the removed test "test_makeitem_non_underscore" comes from an old behavior of skipping names that start with `_` which has since been generalized, making the test no longer relevant.
2020-08-27Merge pull request #7671 from bluetech/ignored-namesRan Benita
RFC: python: skip work pytest_pycollect_makeitem work on certain names
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-25Merge pull request #7687 from bluetech/idval-notsetBruno Oliveira
python: fix empty parametrize() leading to "NotSetType.token" id
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-25Update talks/trainings page (#7661)Florian Bruhin
* Update talks/trainings page - Remove past webinar - Add new open training - Add some talks/webinars by Oliver Bestwalter and by me - Remove some stale link targets * Move sidebar to index
2020-08-25Merge pull request #7670 from bluetech/session-inlineRan Benita
Start simplifying collection code in Session
2020-08-24main: couple of code simplificationsRan Benita
2020-08-24main: move collection cache attributes to local variables in collect()Ran Benita
They are only used for the duration of this function.
2020-08-24main: inline matchnodes() into collect()Ran Benita
Now all of the logic is in one place and may be simplified and refactored in more sensible way.
2020-08-24main: inline _collect() into collect()Ran Benita
This removes an unhelpful level of indirection and enables some upcoming upcoming simplifications.
2020-08-24main: get rid of NoMatchRan Benita
Things are easier to understand without the weird exception.
2020-08-24main: better name for _collection_node_cache3Ran Benita
The weird name was due to f3967333a145d8a793a0ab53ac5e0cb0b6c87cac, now that I understand it a bit better can give it a more descriptive name.
2020-08-24main: make matchnodes non-recursiveRan Benita
It's a little more sane this way.
2020-08-24main: only perform one recursive matchnodes call per nodeRan Benita
2020-08-24main: move NoMatch raising to _collect()Ran Benita
This is a more sensible interface for matchnodes. This also fixes a sort-of bug where a recursive call to matchnodes raises NoMatch which would terminate the entire tree, even if other branches may find a match. Though I don't think it's actually possible.