Skip to content

Commit

Permalink
Update test_commands.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsai881 authored Dec 6, 2023
1 parent 5021252 commit 50debbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/gui/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,14 @@ def assert_videos_written(num_videos: int, labels_path: str = None):
okay = ExportAnalysisFile_ask(context=context, params=params)
assert okay == True
ExportAnalysisFile.do_action(context=context, params=params)
assert_videos_written(num_videos=2, labels_path=context.state["filename"])
assert_videos_written(num_videos=1, labels_path=context.state["filename"])

# Test with all_videos False and all_frames False
params = {"all_videos": False, "all_frames":False, "csv": csv}
params = {"all_videos": False, "all_frames": False, "csv": csv}
okay = ExportAnalysisFile_ask(context=context, params=params)
assert okay == True
ExportAnalysisFile.do_action(context=context, params=params)
assert_videos_written(num_videos=2, labels_path=context.state["filename"])
assert_videos_written(num_videos=1, labels_path=context.state["filename"])

# Add labels path and test with all_videos True and all_frames True (single video)
context.state["filename"] = str(tmpdir.with_name("path.to.labels"))
Expand All @@ -311,7 +311,7 @@ def assert_videos_written(num_videos: int, labels_path: str = None):
# Add a video (no labels) and test with all_videos True and all_frames True
labels.add_video(small_robot_mp4_vid)

params = {"all_videos": True, "all_frames: True, "csv": csv}
params = {"all_videos": True, "all_frames": True, "csv": csv}
okay = ExportAnalysisFile_ask(context=context, params=params)
assert okay == True
ExportAnalysisFile.do_action(context=context, params=params)
Expand Down

0 comments on commit 50debbe

Please sign in to comment.