Skip to content

Commit

Permalink
[6.12.z] Random Fixes in pytest plugins (#13822)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Jan 18, 2024
1 parent aa5fe60 commit face0d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion pytest_plugins/factory_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def pytest_collection_modifyitems(session, items, config):

factory_fixture_names = [m[0] for m in getmembers(sat_cap_factory, isfunction)]
for item in items:
has_factoryfixture = set(item.fixturenames).intersection(set(factory_fixture_names))
itemfixtures = [
itm for itm in item.fixturenames if itm not in ('satellite_factory', 'capsule_factory')
]
has_factoryfixture = set(itemfixtures).intersection(set(factory_fixture_names))
if has_factoryfixture:
item.add_marker('factory_instance')
6 changes: 3 additions & 3 deletions pytest_plugins/requirements/update_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def pytest_report_header(config):
e.g:
# Following will update the mandatory requirements
# pytest tests/foreman --collect-only --upgrade-required-reqs
# pytest tests/foreman --collect-only --update-required-reqs
# Following will update the mandatory and optional requirements
# pytest tests/foreman --collect-only --upgrade-all-reqs
# pytest tests/foreman --collect-only --update-all-reqs
"""
if updater.req_deviation:
print(f"Mandatory Requirements Mismatch: {' '.join(updater.req_deviation)}")
Expand All @@ -46,5 +46,5 @@ def pytest_report_header(config):
if updater.req_deviation or updater.opt_deviation:
print(
"To update mismatched requirements, run the pytest command with "
"'--upgrade-required-reqs' OR '--upgrade-all-reqs' option."
"'--update-required-reqs' OR '--update-all-reqs' option."
)

0 comments on commit face0d0

Please sign in to comment.