]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add assert message to test doth/stress_http_quota.py
authorTom Krizek <tkrizek@isc.org>
Fri, 24 Nov 2023 14:32:09 +0000 (15:32 +0100)
committerTom Krizek <tkrizek@isc.org>
Tue, 5 Dec 2023 12:26:43 +0000 (13:26 +0100)
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.

bin/tests/system/doth/stress_http_quota.py

index 12e29c858e86fd353eee7a252006c899381697a0..05ad0435717ad92ec19e9df122106713e12b26c2 100755 (executable)
@@ -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: