From bfc561f22492f1aed990706a09088642d0785740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Tue, 27 Jan 2026 22:40:47 +0100 Subject: [PATCH] Use relative imports and __init__.py in the statschannel test This is in preparation for automatic import sorting. (cherry picked from commit d0079b57224f522a4cddadf05be3983207b96951) --- bin/tests/system/statschannel/__init__.py | 15 +++++++++++++++ bin/tests/system/statschannel/tests_json.py | 3 +-- bin/tests/system/statschannel/tests_xml.py | 3 +-- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 bin/tests/system/statschannel/__init__.py diff --git a/bin/tests/system/statschannel/__init__.py b/bin/tests/system/statschannel/__init__.py new file mode 100644 index 0000000000..6ba22b927a --- /dev/null +++ b/bin/tests/system/statschannel/__init__.py @@ -0,0 +1,15 @@ +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# SPDX-License-Identifier: MPL-2.0 +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, you can obtain one at https://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + + +import pytest + +pytest.register_assert_rewrite("generic") diff --git a/bin/tests/system/statschannel/tests_json.py b/bin/tests/system/statschannel/tests_json.py index c495a94a83..926da5dab4 100755 --- a/bin/tests/system/statschannel/tests_json.py +++ b/bin/tests/system/statschannel/tests_json.py @@ -18,8 +18,7 @@ import requests import isctest.mark -pytest.register_assert_rewrite("generic") -import generic +from . import generic pytestmark = [ isctest.mark.with_json_c, diff --git a/bin/tests/system/statschannel/tests_xml.py b/bin/tests/system/statschannel/tests_xml.py index 97ca7c1365..b7a1992846 100755 --- a/bin/tests/system/statschannel/tests_xml.py +++ b/bin/tests/system/statschannel/tests_xml.py @@ -19,8 +19,7 @@ import requests import isctest.mark -pytest.register_assert_rewrite("generic") -import generic +from . import generic pytestmark = [ isctest.mark.with_libxml2,