From 05a1e912fd9f257f30709c7b56dfeef3079e1408 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 12 Dec 2025 14:58:47 +0200 Subject: [PATCH] Drop support for pytest 6 --- .github/workflows/build-and-test.yaml | 4 ++-- README.md | 2 +- pyproject.toml | 2 +- pytest_sugar.py | 6 +----- setup.py | 2 +- test_sugar.py | 8 ++------ tox.ini | 2 +- 7 files changed, 9 insertions(+), 17 deletions(-) Index: pytest-sugar-1.1.1/pytest_sugar.py =================================================================== --- pytest-sugar-1.1.1.orig/pytest_sugar.py +++ pytest-sugar-1.1.1/pytest_sugar.py @@ -287,12 +287,8 @@ class SugarTerminalReporter(TerminalRepo ), bold=True, ) - if int(pytest.__version__.split(".")[0]) <= 6: - hook_call_kwargs = {"startdir": self.startpath} - else: - hook_call_kwargs = {"start_path": self.startpath} lines = self.config.hook.pytest_report_header( - config=self.config, **hook_call_kwargs + config=self.config, start_path=self.startpath ) lines.reverse() for line in flatten(lines): Index: pytest-sugar-1.1.1/setup.py =================================================================== --- pytest-sugar-1.1.1.orig/setup.py +++ pytest-sugar-1.1.1/setup.py @@ -41,7 +41,7 @@ setup( zip_safe=False, include_package_data=True, platforms="any", - install_requires=["pytest>=6.2.0", "termcolor>=2.1.0"], + install_requires=["pytest>=7", "termcolor>=2.1.0"], extras_require={ "dev": [ "black", Index: pytest-sugar-1.1.1/test_sugar.py =================================================================== --- pytest-sugar-1.1.1.orig/test_sugar.py +++ pytest-sugar-1.1.1/test_sugar.py @@ -114,7 +114,7 @@ class TestTerminalReporter: def test_report_header(self, testdir): testdir.makeconftest( """ - def pytest_report_header(startdir): + def pytest_report_header(start_path): pass """ )