From 625bee35cce4eb47e5772503db49fa13f5e27094 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 27 Oct 2026 04:16:33 +0100 Subject: [PATCH] fix: record missing data dirs in the run main() starts each run with no notices, so the mocked run records the missing directory itself. --- tests/test_core_file_fills_declaration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_core_file_fills_declaration.py b/tests/test_core_file_fills_declaration.py index b62e83506..1f4ee4309 100644 --- a/tests/test_core_file_fills_declaration.py +++ b/tests/test_core_file_fills_declaration.py @@ -174,7 +174,8 @@ class AMissingDataDirectoryFailsTheRun(unittest.TestCase): offline=True, ) self.assertEqual(gp._MISSING_DATA_DIRS, {"assets"}) - with mock.patch.object(gp, "_main", lambda held: None), \ + # main() starts each run with no notices, so the run itself records it. + with mock.patch.object(gp, "_main", lambda held: gp._MISSING_DATA_DIRS.add("assets")), \ contextlib.redirect_stderr(io.StringIO()), \ self.assertRaises(SystemExit) as stop: gp.main()