Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] Update pytest hook parameters #10112

Merged
merged 1 commit into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfme/fixtures/nelson.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_meta(obj):
return p.metadata


def pytest_collection_modifyitems(items):
def pytest_collection_modifyitems(session, config, items):
output = {}
for item in items:
item_class = item.location[0]
Expand Down
2 changes: 1 addition & 1 deletion cfme/fixtures/ui_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def pytest_sessionstart(self, session):
conf.save('.ui-coverage')

@pytest.hookimpl(hookwrapper=True)
def pytest_collection_finish(self):
def pytest_collection_finish(session):
yield
# Install coverage after collection finishes
if store.parallelizer_role != 'master':
Expand Down
2 changes: 1 addition & 1 deletion cfme/fixtures/xunit_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def gen_duplicates_log(items):


@pytest.hookimpl(trylast=True)
def pytest_collection_modifyitems(config, items):
def pytest_collection_modifyitems(session, config, items):
"""Generates the XML files using collected items."""
if not (config.getoption('generate_xmls') or config.getoption('generate_legacy_xmls')):
return
Expand Down
2 changes: 1 addition & 1 deletion cfme/markers/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def pytest_addoption(parser):


@pytest.hookimpl(tryfirst=True)
def pytest_collection_modifyitems(config, items):
def pytest_collection_modifyitems(session, config, items):
if config.getvalue('include_manual'):
return
is_manual = config.getvalue('manual')
Expand Down
2 changes: 1 addition & 1 deletion cfme/markers/perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


@pytest.hookimpl(tryfirst=True)
def pytest_collection_modifyitems(items):
def pytest_collection_modifyitems(session, config, items):
# mark all perf tests here so we don't have to maintain the mark in those modules
for item in items:
if item.nodeid.startswith('cfme/tests/perf'):
Expand Down
2 changes: 1 addition & 1 deletion cfme/markers/polarion.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def extract_polarion_ids(item):


@pytest.hookimpl(tryfirst=True)
def pytest_collection_modifyitems(config, items):
def pytest_collection_modifyitems(session, config, items):
xml = getattr(config, '_xml', None)
if xml is None:
return
Expand Down