Skip to content

Commit aa4c960

Browse files
author
Daniel Flores
committed
make rounding error reproducible
1 parent 6358c4b commit aa4c960

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_samplers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def test_floating_point_precision_in_clips_at_regular_timestamps(policy):
706706
# Using 1/3 would cause arange to include sampling_range_end, which gets filtered out
707707
# in _build_all_clips_timestamps, leaving clips with no frames.
708708
# The fix rounds seconds_between_clip_starts to prevent this.
709-
seconds_between_clip_starts = 1 / 3
709+
seconds_between_clip_starts = 1 / 3 - 1e-9
710710

711711
decoder = VideoDecoder(H265_10BITS.path) # Video is 1 second long
712712
# Set sampling range so that last clip will have frame timestamp ≈ end_stream_seconds

0 commit comments

Comments
 (0)