fix: record missing data dirs in the run

main() starts each run with no notices, so the mocked run records the
missing directory itself.
This commit is contained in:
Abdessamad Derraz committed 2026-10-27 04:16:33 +01:00
1 parent ed4580a2f7
commit 625bee35cc
1 file changed
+2 -1
+2 -1
View File
@@ -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()