Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
SohamTilekar committed Mar 22, 2024
1 parent f76f924 commit 932e675
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_imagesequenceclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ def test_make_frame_pil(image_sequence_clip: ImageSequenceClip):

def test_fl_frame_transform(image_sequence_clip: ImageSequenceClip):
# Define a transformation function
def transform_func(frame: Image.Image):
def transform_func(frame: np.ndarray):
# Convert to grayscale
return frame.convert("L")
return np.array(Image.fromarray(frame).convert("L"))

# Apply the transformation to the clip
transformed_clip = image_sequence_clip.fl_frame_transform(transform_func)
assert isinstance(transformed_clip, ImageSequenceClip)
assert all(frame.mode == "L" for frame in transformed_clip.clip)
assert all(Image.fromarray(frame).mode == "L" for frame in transformed_clip.clip)


if __name__ == "__main__":
Expand Down

0 comments on commit 932e675

Please sign in to comment.