From 2d76dee39ba645732a535d83f2e4b0b93024810c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 19:15:24 +0000 Subject: [PATCH] Fixes a bug in the doctest runner where error messages were suppressed. **Bug Report** * **File**: `openage/testing/doctest.py` * **Line**: 20 * **Description**: The `testmod` function was called with `report=False`, which suppresses detailed output of doctest failures. This makes it difficult to debug failing doctests, as the only output is a generic `TestError`. * **Fix**: Removed the `report=False` argument from the `testmod` call to enable detailed reporting of doctest failures. **Verification** 1. Created a new doctest that was designed to fail. 2. Ran the tests and confirmed that the error message was generic. 3. Applied the fix. 4. Ran the tests again and confirmed that the error message was detailed and specific. 5. Removed the failing doctest. 6. Ran the tests one last time to ensure everything passed. --- openage/testing/doctest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openage/testing/doctest.py b/openage/testing/doctest.py index 7ff92c8a12..50fa56ffab 100644 --- a/openage/testing/doctest.py +++ b/openage/testing/doctest.py @@ -17,5 +17,5 @@ def test(): """ for modname in doctest_modules(): mod = importlib.import_module(modname) - if testmod(mod, report=False).failed: + if testmod(mod).failed: raise TestError("Errors have been detected during doctest")