From: Tom Krizek Date: Fri, 24 Nov 2023 14:50:08 +0000 (+0100) Subject: Allow assertion message rewrite in statschannel test X-Git-Tag: v9.19.19~14^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a57af8163aeb3ca1506ec5ebced922d8a3439667;p=thirdparty%2Fbind9.git Allow assertion message rewrite in statschannel test By default, the useful assertion message rewrite is used by pytest for test modules only. Since another module is imported with shared functionality, ensure it has pytest's assertion message rewriting enabled to obtain more debug information in case it fails. --- diff --git a/bin/tests/system/statschannel/tests_json.py b/bin/tests/system/statschannel/tests_json.py index cf1deb6fd3e..2cd7a537c9a 100755 --- a/bin/tests/system/statschannel/tests_json.py +++ b/bin/tests/system/statschannel/tests_json.py @@ -15,9 +15,11 @@ from datetime import datetime import pytest -import generic import pytest_custom_markers +pytest.register_assert_rewrite("generic") +import generic + pytestmark = pytest_custom_markers.have_json_c requests = pytest.importorskip("requests") diff --git a/bin/tests/system/statschannel/tests_xml.py b/bin/tests/system/statschannel/tests_xml.py index 29c2e88bfd5..5f92a699009 100755 --- a/bin/tests/system/statschannel/tests_xml.py +++ b/bin/tests/system/statschannel/tests_xml.py @@ -16,9 +16,11 @@ import xml.etree.ElementTree as ET import pytest -import generic import pytest_custom_markers +pytest.register_assert_rewrite("generic") +import generic + pytestmark = pytest_custom_markers.have_libxml2 requests = pytest.importorskip("requests")