From 607f7603afdbaf2dcace7f1ed33af34a1d245291 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 31 Mar 2020 09:38:51 +0200 Subject: [PATCH] doc: pytest_collection: has to set `session.items` Would make sense to use its return value etc, but this helps for now. --- src/_pytest/hookspec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 1e16d092d..6db543feb 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -170,6 +170,8 @@ def pytest_load_initial_conftests(early_config, parser, args): def pytest_collection(session: "Session") -> Optional[Any]: """Perform the collection protocol for the given session. + The hook has to set `session.items` to a sequence of items. + Stops at first non-None result, see :ref:`firstresult`. :param _pytest.main.Session session: the pytest session object