Commit da02792b9b for bind
commit da02792b9b90be20464820c80601e77be43c9127
Author: Štěpán Balážik <stepan@isc.org>
Date: Sat Nov 28 19:05:41 2026 +0100
Select the hypothesis profile from conftest.py
The import of isctest.hypothesis.settings registered the "ci" profile
and loaded the profile named by HYPOTHESIS_PROFILE as a side effect.
Do that in a function which conftest.py calls instead, so that
importing the module has no effect of its own and conftest.py does not
need an import that is reported as unused.
diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py
index 062e93ed8e..41506f88fb 100644
--- a/bin/tests/system/conftest.py
+++ b/bin/tests/system/conftest.py
@@ -46,6 +46,8 @@ import isctest
# pylint: enable=wrong-import-position
+isctest.hypothesis.settings.select_profile()
+
# Silence warnings caused by passing a pytest fixture to another fixture.
# pylint: disable=redefined-outer-name
diff --git a/bin/tests/system/isctest/hypothesis/settings.py b/bin/tests/system/isctest/hypothesis/settings.py
index 6540e7c5f0..5a84f5b7b2 100644
--- a/bin/tests/system/isctest/hypothesis/settings.py
+++ b/bin/tests/system/isctest/hypothesis/settings.py
@@ -13,6 +13,8 @@ import os
from hypothesis import settings
-# Timing of hypothesis tests is flaky in the CI, so we disable deadlines.
-settings.register_profile("ci", deadline=None)
-settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))
+
+def select_profile() -> None:
+ # Timing of hypothesis tests is flaky in the CI, so we disable deadlines.
+ settings.register_profile("ci", deadline=None)
+ settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))