Ran Benita
01797e6370
Type annotate _pytest.debugging (a bit)
2020-06-05 11:34:20 +03:00
Ran Benita
90e58f8961
Type annotate some parts related to runner & reports
2020-06-05 11:34:20 +03:00
Ran Benita
e68a26199c
Type annotate misc functions
2020-06-05 11:34:19 +03:00
Ran Benita
247c4c0482
Type annotate some more hooks & impls
2020-06-05 11:34:19 +03:00
Ran Benita
ef34729541
Type annotate fixtures.py & related
2020-06-05 11:34:19 +03:00
Ran Benita
be00e12d47
Type annotate main.py and some parts related to collection
2020-06-05 11:34:19 +03:00
Ran Benita
0fb081aec6
Type annotate some hookspecs & impls
...
Annotate some "easy" arguments of hooks that repeat in a lot of internal
plugins.
Not all of the arguments are annotated fully for now.
2020-06-05 11:34:19 +03:00
Ran Benita
85b5a289f0
warnings: fix missing None in existing hook & add some docs ( #7288 )
2020-06-02 19:59:25 +03:00
Gleb Nikonorov
14de08011b
fix the unit tests, add the proper deprecation warning, and add in a changelog entry
2020-05-27 23:03:07 -04:00
Gleb Nikonorov
d742b386c3
provide missing location parameter, and add type annotations to the hookspec
2020-05-27 00:53:31 -04:00
Gleb Nikonorov
125b663f20
Address all feedback, minus the empty sring v None nodeid which is being discussed
2020-05-25 11:18:24 -04:00
Gleb Nikonorov
088d400b2d
rename pytest_warning_record -> pytest_warning_recorded
2020-05-24 20:43:23 -04:00
Gleb Nikonorov
9ee6550181
Add in a new hook pytest_warning_recorded for warning capture
...
communication
2020-05-24 19:05:24 -04:00
Ran Benita
85732e2b08
Merge pull request #6993 from blueyed/doc-pytest_collection-upstream
...
[WIP] doc: pytest_collection: has to set `session.items`
2020-05-05 21:05:56 +03:00
Daniel Hahler
a98a62723e
revisit
2020-04-09 01:57:46 +02:00
Daniel Hahler
1fd14685c5
doc: document inversed lines with terminal report hooks ( #7016 )
...
It was surprising that `tryfirst=True` would not result in lines being
added to the beginning with `pytest_report_header`.
This is due to lines being reversed, and therefore the same applies to
`pytest_report_collectionfinish`.
2020-04-07 08:08:28 +02:00
Ran Benita
1ce30fd38f
Document the pytest_report_teststatus hook better and test uncovered functionality
...
This hook has some functionality to provide explicit markup for the test
status. It seemed unused and wasn't tested, so I was tempted to remove
it, but I found that the pytest-rerunfailures plugin uses it, so
document it and add a test instead.
2020-04-04 17:27:59 +03:00
Daniel Hahler
354602abe6
Update src/_pytest/hookspec.py
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2020-04-02 12:01:43 +02:00
Daniel Hahler
607f7603af
doc: pytest_collection: has to set `session.items`
...
Would make sense to use its return value etc, but this helps for now.
2020-03-31 09:39:50 +02:00
Ronny Pfannschmidt
9fd71d6fe0
fix #571 : deprecate pytest_collect_directory as ... ( #6847 )
...
Deprecate pytest_collect_directory
Fix #571
Co-authored-by: Daniel Hahler <github@thequod.de>
2020-03-03 18:58:14 -03:00
Ran Benita
d839686c7b
Don't delete FixtureDef.cached_result, set it to None instead
...
Previously `cached_result` was either set or deleted. Type annotations
cannot handle this, so use `None` for the non-set state instead.
2020-02-14 14:18:58 +02:00
Bruno Oliveira
39b25ddcf3
Remove deprecated 'pytest_itemstart' hook ( #6637 )
...
Remove deprecated 'pytest_itemstart' hook
2020-01-31 16:12:27 -03:00
Ran Benita
a435faad5c
Merge branch 'master' into master-to-features
2020-01-31 11:27:06 +02:00
Bruno Oliveira
70739296e1
Remove deprecated 'pytest_itemstart' hook
...
This hook has been deprecated/removed for more than 10 years
in a2fe6714f8
.
2020-01-30 21:03:29 -03:00
Daniel Hahler
88b800355a
typing: pytest_collection
2020-01-30 19:58:43 +01:00
Philipp Loose
a02310a140
Add stacklevel tests for warnings, 'location' to pytest_warning_captured
...
Resolves #4445 and #5928 (thanks to allanlewis)
Add CHANGELOG for location parameter
2019-11-22 17:50:00 -03:00
Daniel Hahler
55bc084dcc
doc: s/_pytest.config.Parser/_pytest.config.argparsing.Parser/
2019-11-13 23:22:25 +01: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
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
09096f7436
Remove 'experimental' status from report serialization hooks
2019-10-30 09:43:33 -03:00
Bruno Oliveira
0383d43645
Add missing version added/changed markers to docs
...
Notice some features since 5.0 were not being properly
marked in which version they have been added/changed.
2019-10-15 19:45:58 -03:00
Bruno Oliveira
3a17c1b30b
Remove 'pytest_logwarning' hook
2019-06-30 13:18:07 -03:00
Bruno Oliveira
3afee36ebb
Improve docs and reference
2019-06-26 19:15:00 -03:00
Victor Maryama
d638da5821
Using ini-file option instead of cmd option.
2019-06-26 18:10:16 +02:00
Victor Maryama
80ac910a24
Added msg to docstring for cleaning pyc.
2019-06-25 19:49:57 +02:00
Victor Maryama
4db5488ed8
Now dependent on command line option.
2019-06-25 19:49:05 +02:00
Victor Maryama
98b212cbfb
Added "experimental" note.
2019-06-25 10:35:09 +02:00
Victor Maryama
9a89783fbb
Assertion passed hook
2019-06-24 16:09:39 +02:00
Anthony Sottile
5034399d7a
pre-commit run fix-encoding-pragma --all-files
2019-06-03 12:08:01 -03:00
Anthony Sottile
dc75b6af47
Use fix-encoding-pragma pre-commit hook
2019-05-14 15:56:31 -07:00
Bruno Oliveira
9f66102869
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-04 10:47:57 -03:00
DamianSkrzypczak
1bd7d287a7
doc: fix hooks 'path' parameter doc type
...
by changing it from str to py.path.local
(#5171 )
2019-05-02 20:51:11 +02:00
Daniel Hahler
c43a9c83ee
doc: pytest_deselected: not only via keywords
2019-04-14 23:53:06 +02:00
Daniel Hahler
4e931b258d
Merge master into features
2019-03-29 11:05:46 +01:00
Gary Tyler
403f556928
Update docs for 'pytest_cmdline_parse' hook to note availability liminations
2019-03-28 19:25:55 -04:00
Bruno Oliveira
65c8e8a09e
Rename hooks: to/from_serializable
2019-03-28 13:41:56 -03:00
Bruno Oliveira
f2e0c740d3
Code review suggestions
2019-03-25 20:16:59 -03:00
Bruno Oliveira
7b9a414524
Add pytest_report_serialize and pytest_report_unserialize hooks
...
These hooks will be used by pytest-xdist and pytest-subtests to
serialize and customize reports.
2019-03-25 20:16:59 -03:00
Bruno Oliveira
cea42ff9e4
Docs: modules implementing pytest_cmdline_parse can be early-loaded
...
Related to #4974
2019-03-25 18:43:06 -03:00
Daniel Hahler
0d31e852b1
Run isort
2019-03-01 14:24:18 +01:00