From: Tom Krizek Date: Fri, 24 Nov 2023 14:32:09 +0000 (+0100) Subject: Add assert message to test doth/stress_http_quota.py X-Git-Tag: v9.19.19~14^2~5 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=767f4670c6dd52be7ef2e468950ada89ace73ee7;p=thirdparty%2Fbind9.git Add assert message to test doth/stress_http_quota.py This file is executed outside of pytest with pure python, which doesn't do any AssertionError message rewriting like pytest. Ensure the assert messages in this file provide a useful debug message. --- diff --git a/bin/tests/system/doth/stress_http_quota.py b/bin/tests/system/doth/stress_http_quota.py index 12e29c858e8..05ad0435717 100755 --- a/bin/tests/system/doth/stress_http_quota.py +++ b/bin/tests/system/doth/stress_http_quota.py @@ -161,12 +161,12 @@ class SubDIG: # and examining their statuses in one logical operation. class MultiDIG: def __init__(self, numdigs, http_secure=None, extra_args=None): - assert int(numdigs) > 0 + assert int(numdigs) > 0, f"numdigs={numdigs}" digs = [] for _ in range(1, int(numdigs) + 1): digs.append(SubDIG(http_secure=http_secure, extra_args=extra_args)) self.digs = digs - assert len(self.digs) == int(numdigs) + assert len(self.digs) == int(numdigs), f"len={len(self.digs)} numdigs={numdigs}" def run(self): for p in self.digs: