Skip to content

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

test(size-hold): a walk cut by hand is held whatever the clip holds beyond the cut — the walk away cut on the last cycle of 72 frames, the clip run on past it by 0, 1 or 5 of the cut's own first frames again (or cut on its first cycle, the clip opened by 0, 1 or 5 of its last), which show no change against it, is held on 24 pairs, one a frame, and passes; read on the frames with a partner later alone, one frame after the cut left one pair, which read no change, and the shrink the other 23 show went unheld: refused at 7.94 where the cut passes at 1.19 with nothing after it (red)

Soohong Kimdd7bd7637fe7
diff --git a/tests/video/test_gait_fallback.py b/tests/video/test_gait_fallback.py
index 8092122..e24f544 100644
--- a/tests/video/test_gait_fallback.py
+++ b/tests/video/test_gait_fallback.py
@@ -392,6 +392,32 @@ def test_a_walk_cut_again_by_hand_is_held_at_its_size_and_its_feet(tmp_path, cli
assert not list(output.glob(f'.{loop.FALLBACK_FRAMES}*'))
[email protected]('outside', [0, 1, 5])
[email protected]('end', ['after', 'before'])
+def test_a_walk_cut_by_hand_is_held_whatever_the_clip_holds_beyond_the_cut(tmp_path, end, outside):
+ """A cut the caller names reads its change on each of its frames, against the frame its length later or, where the
+ clip ends before that, its length earlier: a frame the clip holds beyond the cut is the partner of one frame of it
+ and no more. The walk away cut on the last cycle of 72 frames, the clip run on past it by the cut's own first
+ frames again (or cut on its first cycle, the clip opened by the cut's last frames), which show no change against
+ it: held on 24 pairs however many of them there are, and the loop closes. Read on the frames with a partner later
+ alone, one frame after the cut left one pair, which read no change, and the shrink the other 23 show went unheld:
+ refused at 7.94, where the cut passes at 1.19 with nothing after it."""
+ frames = [walking_away(k) for k in range(72)]
+ if end == 'after':
+ clip, start = frames+[frames[48+j].copy() for j in range(outside)], 48
+ else:
+ clip, start = [frames[24-outside+j].copy() for j in range(outside)]+frames, outside
+ code, report, output = run(tmp_path, clip, cut=('--cycle', 'fixed', '--start', str(start), '--length', '24', '--anchor', 'body'))
+ seen = report['size_hold']['at_cut']
+ assert seen['pairs'] == 24 and seen['size'] is True and seen['feet'] is True, seen
+ assert report['size_hold']['applied'] is True
+ assert code == 0 and report['status'] == 'passed', code
+ assert report['resampled_seam_ratio'] <= loop.SEAM_RATIO_MAX
+ edges = wrap_and_inner(output)
+ assert all(wrap <= inner for wrap, inner in edges.values()), edges
+
+
@pytest.mark.slow
def test_a_walk_cut_again_by_hand_as_filmed(tmp_path):
"""`--size-hold off`: the cut the caller names is the frames as filmed — the cut's frames are the clip's, pixel for