From 6087fd967e9ac747697e51444a3ac8ff99008ff6 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 12 Oct 2026 20:00:35 +0200 Subject: [PATCH] zero-byte test asserts cultcache-py's own refusal, so a restored add-on size==0 branch fails it The test compares type and message with SingleFileMessagePackBackingStore.pull_all on the same file; the add-on's shape refusal (also a ValueError) no longer passes. Co-Authored-By: Claude Opus 5.5 --- tools/blender/tests/test_ship_cc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/blender/tests/test_ship_cc.py b/tools/blender/tests/test_ship_cc.py index 0a07f8377..1b74b6311 100644 --- a/tools/blender/tests/test_ship_cc.py +++ b/tools/blender/tests/test_ship_cc.py @@ -157,8 +157,14 @@ class ReadTests(ShipFileCase): # An empty file is not a store (CultLib pins this): the owner's refusal passes through, the add-on adds none. empty = str(Path(self.path).with_name("empty.cc")) Path(empty).write_bytes(b"") - with self.assertRaises(ValueError): + with self.assertRaises(ValueError) as owner: + cultcache_py.SingleFileMessagePackBackingStore(empty).pull_all() + with self.assertRaises(ValueError) as raised: ship_cc.read(empty, PACKAGES) + # The very refusal cultcache-py makes, not one the add-on spells beside it (its shape refusal is a ValueError too). + self.assertIs(type(raised.exception), type(owner.exception)) + self.assertEqual(str(raised.exception), str(owner.exception)) + self.assertNotIn("must hold exactly one", str(raised.exception)) def test_refuses_a_ship_record_that_still_carries_the_retired_embedded_hull(self): for name, ship in (("nested hull", ["mod.skiff", hull_body()]),