-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix e2b Websocket issue Remove health/liveness checking code * Bump pydantic to 2.7.4 to include a bug fix; Rewrite save_video() using cv2 (get rid of moviepy); Add retry for common e2b exceptions * Update template name
- Loading branch information
1 parent
23d4af5
commit 9f53e01
Showing
6 changed files
with
137 additions
and
177 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by CodiumAI | ||
from pathlib import Path | ||
|
||
import numpy as np | ||
|
||
from vision_agent.tools.tools import save_video | ||
|
||
|
||
class TestSaveVideo: | ||
def test_saves_frames_without_output_path(self): | ||
frames = [ | ||
np.random.randint(0, 256, (480, 640, 3), dtype=np.uint8) for _ in range(10) | ||
] | ||
output_path = save_video(frames) | ||
assert Path(output_path).exists() | ||
|
||
def test_saves_frames_with_output_path(self, tmp_path): | ||
frames = [ | ||
np.random.randint(0, 256, (480, 640, 3), dtype=np.uint8) for _ in range(10) | ||
] | ||
video_output_path = str(tmp_path / "output.mp4") | ||
output_path = save_video(frames, video_output_path) | ||
|
||
assert output_path == video_output_path | ||
assert Path(output_path).exists() | ||
|
||
# Handles an empty list of frames gracefully | ||
def test_handles_empty_frames_list(self): | ||
frames = [] | ||
output_path = save_video(frames) | ||
assert Path(output_path).exists() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.