Skip to content

Commit 810b63d

Browse files
committed
Added (breaking) test for number of frames equal to number of rows in dataframe.
1 parent 744cfc2 commit 810b63d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

PostProcessing/test_functions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ def test_session_data(session_data):
5050
assert os.path.exists(vp)
5151
assert os.path.isfile(vp)
5252

53+
for vp, df in zip(video_paths, dataframes):
54+
_, _, num_frames = video_info(vp)
55+
num_rows = len(df)
56+
assert num_frames == num_rows, f"Num of frames in the video ({num_frames}) differs from the num of rows in the dataframe ({num_rows})."
57+
5358

5459
def session_data_list() -> List[Tuple[str, pd.DataFrame, str]]:
5560

@@ -90,8 +95,6 @@ def test_df_reparation(client_data):
9095
diffs = tstamps.diff().dropna()
9196
assert (diffs <= (time_step + THRESHOLD_NS)).all(), "some timestamps difference is longer than expected"
9297

93-
pass
94-
9598

9699
def test_df_trimming(session_data):
97100
_, dataframes, _ = session_data

0 commit comments

Comments
 (0)