From 2654fc47523ce7fc83eb6752e95fd27bbad22047 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 5 Aug 2026 14:51:42 +0100 Subject: [PATCH] Update comments --- tests/util/test_logcontext.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/util/test_logcontext.py b/tests/util/test_logcontext.py index c5cb6c9efb..ed9942ed95 100644 --- a/tests/util/test_logcontext.py +++ b/tests/util/test_logcontext.py @@ -732,18 +732,15 @@ class LogContextErrorMessageTestCase(unittest.TestCase): """Tests asserting the exact messages passed to `logcontext_error`, and the conditions that trigger each one. - The implementation lives in Rust (`rust/src/logging/context.rs`). - Downstream log scraping depends on the wording and argument order of these - messages, so accidental changes must fail a test. Messages that - interpolate a context with `%r` include the object's `repr()`, and so its - memory address; the expected strings are therefore built from the same - live objects rather than hard-coded. + The implementation lives in Rust (`rust/src/logging/context.rs`). Downstream + log scraping depends on the wording and argument order of these messages, so + accidental changes must fail a test. """ def setUp(self) -> None: - # These tests call `__enter__`/`__exit__`/`start`/`stop` by hand; make - # sure the current context ends up back at the sentinel regardless of - # what a test does. + # These tests call `__enter__`/`__exit__`/`start`/`stop` by hand. Let's + # make sure the current context ends up back at the sentinel regardless + # of what a test does. self.assertIs(current_context(), SENTINEL_CONTEXT) self.addCleanup(set_current_context, SENTINEL_CONTEXT)