From 767f4670c6dd52be7ef2e468950ada89ace73ee7 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Fri, 24 Nov 2023 15:32:09 +0100 Subject: [PATCH] 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. --- bin/tests/system/doth/stress_http_quota.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/doth/stress_http_quota.py b/bin/tests/system/doth/stress_http_quota.py index 12e29c858e..05ad043571 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: