Skip to content

Commit 478b74b

Browse files
authored
Fix pytest_terminal_summary for pytest<4.2 (#2589)
#### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> #### What does this implement or fix? Man group's pegasus next vevn uses an old version of pytest which does not support the `config` argument. We're not using it anyway so just removing it. The config flag was added in 4.2 as per [docs](https://docs.pytest.org/en/stable/reference/reference.html#pytest.hookspec.pytest_terminal_summary) #### Any other comments? #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing -->
1 parent 99c0afa commit 478b74b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,8 +1505,8 @@ def pytest_runtest_makereport(item, call):
15051505
from tests.pytest_xfail import pytest_runtest_makereport
15061506
return pytest_runtest_makereport(item, call)
15071507

1508-
def pytest_terminal_summary(terminalreporter, exitstatus, config):
1508+
def pytest_terminal_summary(terminalreporter, exitstatus):
15091509
from tests.pytest_xfail import pytest_terminal_summary
1510-
pytest_terminal_summary(terminalreporter, exitstatus, config)
1510+
pytest_terminal_summary(terminalreporter, exitstatus)
15111511

15121512
#endregion

python/tests/pytest_xfail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def pytest_runtest_makereport(item, call):
3636
marked_tests.append(item.nodeid)
3737
return report
3838

39-
def pytest_terminal_summary(terminalreporter, exitstatus, config):
39+
def pytest_terminal_summary(terminalreporter, exitstatus):
4040
if marked_tests:
4141
terminalreporter.write("\n=== SPECIAL XFAIL SUMMARY ===\n", bold=True)
4242
for test_id in marked_tests:

0 commit comments

Comments
 (0)