You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Equality tests don't independently pin compare=False on _fetched #62
The adversarial review flags that `tests/test_vis.py::TestVisEquality` has
a gap: removing `compare=False` from `_fetched` individually (while keeping
it on `_textures`) leaves all current tests passing, because
`test_equality_ignores_finish_internal_state` ends with both sides having
the same empty cache (the `finish` setter clears `_fetched=False` on both).
So the test suite doesn't independently pin that `_fetched` is excluded
from equality.
Add
deftest_equality_ignores_fetched_flag(self):
"""Two Vis with identical identity + scalars + textures must compare equal even if one has _fetched=True and the other has _fetched=False. Guards against someone removing field(compare=False) from _fetched but leaving it on _textures."""a=Vis(source="ambientcg", material_id="Metal012", roughness=0.3)
b=Vis(source="ambientcg", material_id="Metal012", roughness=0.3)
# Both have _textures={} by default; only the flag differsobject.__setattr__(a, "_fetched", True)
asserta==b, "_fetched must not affect equality"
(Using `object.setattr` to bypass the cache-invalidation hook so we
isolate the flag from the dict.)
Activity
feat: 3.1.2 — milestone 1 audit follow-ups (13 issues closed)