Files
olivv-cs-ComfyUI-FunPack/tests
digital-garbageandClaude Sonnet 5 4960fd2178 test: cover the real-direction cache path round 3 of review found was untested
The previous caching test only exercised the zero-direction torch.zeros()
fallback -- round 1's actual bug lived in the real-direction branch
(direction.to(out.dtype).to(out.device)), which a torch.zeros count can't
see at all. Adds a second test using a deliberately non-matching dtype
(float64 direction against a float32 harness) so .to() is never a
coincidental no-op, then counts .to() calls on the direction tensor itself.

Verified by mutation: temporarily reverted dir_t_cache to round-1's buggy
shape (real-direction path uncached) and confirmed this new test fails
(3 calls instead of 1) while the old zero-direction-only test still passes
-- proving the old test alone would have let that exact regression through.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 19:51:16 +03:00
..