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

Commit

Permalink
Merge pull request #10112 from mshriver/fix-pytest-hook-args
Browse files Browse the repository at this point in the history
[1LP][RFR] Update pytest hook parameters
  • Loading branch information
mshriver authored May 21, 2020
2 parents 923c1fa + 6251ff3 commit 1b3285d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
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

0 comments on commit 1b3285d

Please sign in to comment.