Skip to content

Commit

Permalink
Merge pull request #278 from suutari-ai/fix-deprecated-startdir
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmayer authored Jan 24, 2024
2 parents bcfb953 + 52aa761 commit 083723b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytest_sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,12 @@ def pytest_sessionstart(self, session: Session) -> None:
),
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, startdir=self.startpath
config=self.config, **hook_call_kwargs
)
lines.reverse()
for line in flatten(lines):
Expand Down

0 comments on commit 083723b

Please sign in to comment.