Skip to content

Commit 6c92e94

Browse files
committed
make tests stricter
1 parent f4cadbb commit 6c92e94

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/test_videoapi.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,8 @@ def test_frame_reading(self, test_video):
7676

7777
# compare the frames and ptss
7878
for i in range(len(vr_frames)):
79-
assert float(av_pts[i]) == approx(vr_pts[i], abs=0.1)
80-
81-
mean_delta = torch.mean(torch.abs(av_frames[i].float() - vr_frames[i].float()))
82-
# on average the difference is very small and caused
83-
# by decoding (around 1%)
84-
# TODO: asses empirically how to set this? atm it's 1%
85-
# averaged over all frames
86-
assert mean_delta.item() < 2.55
79+
assert av_pts[i] == vr_pts[i]
80+
torch.test.assert_equal(av_frames[i], vr_frames[i])
8781

8882
del vr_frames, av_frames, vr_pts, av_pts
8983

0 commit comments

Comments
 (0)