Skip to content

Commit bd2ae62

Browse files
committed
Decorate hook impls with pytest.hookimpl
This is not strictly needed but I like it for explicitness.
1 parent 68d1ab9 commit bd2ae62

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytest_django/plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# ############### pytest hooks ################
5353

5454

55+
@pytest.hookimpl()
5556
def pytest_addoption(parser):
5657
group = parser.getgroup("django")
5758
group.addoption(
@@ -241,6 +242,7 @@ def _get_boolean_value(x, name, default=None):
241242
)
242243

243244

245+
@pytest.hookimpl()
244246
def pytest_load_initial_conftests(early_config, parser, args):
245247
# Register the marks
246248
early_config.addinivalue_line(
@@ -322,6 +324,7 @@ def _get_option_with_source(option, envname):
322324
_setup_django()
323325

324326

327+
@pytest.hookimpl()
325328
def pytest_report_header():
326329
if _report_header:
327330
return ["django: " + ", ".join(_report_header)]

0 commit comments

Comments
 (0)