From 37dd548b90cc2eec472592e24de460b7dba551e6 Mon Sep 17 00:00:00 2001 From: "j.belina" Date: Tue, 3 Nov 2026 02:48:53 +0100 Subject: [PATCH] Pass config to pytest_report_teststatus in the nbdime reporter pytest 9 has a built-in pytest_report_teststatus implementation (in _pytest/subtests.py) that takes config. NbdimeReporter calls the hook without it, so pluggy raises HookCallError: hook call must provide argument 'config' and a run with --nbdime ends with an internal error. This is why test_nbdime fails with pytest 9. Co-Authored-By: Claude Opus 5.5 --- nbval/nbdime_reporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbval/nbdime_reporter.py b/nbval/nbdime_reporter.py index 64871a2..e38c574 100644 --- a/nbval/nbdime_reporter.py +++ b/nbval/nbdime_reporter.py @@ -56,7 +56,7 @@ def __init__(self, config, file=None): def pytest_runtest_logreport(self, report): """Store all test reports for evaluation on finish""" rep = report - res = self.config.hook.pytest_report_teststatus(report=rep) + res = self.config.hook.pytest_report_teststatus(report=rep, config=self.config) cat, letter, word = res self.stats.setdefault(cat, []).append(rep)