@@ -407,7 +407,7 @@ async def test_future_samples_not_included(
407407 a_sequence (sample0s , sample1s ), config , source_props # sample2_1s is not here
408408 )
409409 assert source_props == SourceProperties (
410- sampling_start = timestamp , received_samples = 3 , sampling_period_s = None
410+ sampling_start = timestamp , received_samples = 3 , sampling_period = None
411411 )
412412 assert _get_buffer_len (resampler , source_receiver ) == config .initial_buffer_len
413413 sink_mock .reset_mock ()
@@ -489,7 +489,7 @@ async def test_resampling_with_one_window(
489489 a_sequence (sample1s ), config , source_props
490490 )
491491 assert source_props == SourceProperties (
492- sampling_start = timestamp , received_samples = 2 , sampling_period_s = None
492+ sampling_start = timestamp , received_samples = 2 , sampling_period = None
493493 )
494494 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
495495 sink_mock .reset_mock ()
@@ -518,7 +518,9 @@ async def test_resampling_with_one_window(
518518 # By now we have a full buffer (5 samples and a buffer of length 4), which
519519 # we received in 4 seconds, so we have an input period of 0.8s.
520520 assert source_props == SourceProperties (
521- sampling_start = timestamp , received_samples = 5 , sampling_period_s = 0.8
521+ sampling_start = timestamp ,
522+ received_samples = 5 ,
523+ sampling_period = timedelta (seconds = 0.8 ),
522524 )
523525 # The buffer should be able to hold 2 seconds of data, and data is coming
524526 # every 0.8 seconds, so we should be able to store 3 samples.
@@ -536,7 +538,9 @@ async def test_resampling_with_one_window(
536538 current_iteration = 3 ,
537539 )
538540 assert source_props == SourceProperties (
539- sampling_start = timestamp , received_samples = 5 , sampling_period_s = 0.8
541+ sampling_start = timestamp ,
542+ received_samples = 5 ,
543+ sampling_period = timedelta (seconds = 0.8 ),
540544 )
541545 assert _get_buffer_len (resampler , source_recvr ) == 3
542546
@@ -598,7 +602,7 @@ async def test_resampling_with_one_and_a_half_windows( # pylint: disable=too-ma
598602 a_sequence (sample0s , sample1s ), config , source_props
599603 )
600604 assert source_props == SourceProperties (
601- sampling_start = timestamp , received_samples = 2 , sampling_period_s = None
605+ sampling_start = timestamp , received_samples = 2 , sampling_period = None
602606 )
603607 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
604608 sink_mock .reset_mock ()
@@ -626,7 +630,7 @@ async def test_resampling_with_one_and_a_half_windows( # pylint: disable=too-ma
626630 a_sequence (sample2_5s , sample3s , sample4s ), config , source_props
627631 )
628632 assert source_props == SourceProperties (
629- sampling_start = timestamp , received_samples = 5 , sampling_period_s = None
633+ sampling_start = timestamp , received_samples = 5 , sampling_period = None
630634 )
631635 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
632636 sink_mock .reset_mock ()
@@ -654,7 +658,9 @@ async def test_resampling_with_one_and_a_half_windows( # pylint: disable=too-ma
654658 # By now we have a full buffer (7 samples and a buffer of length 6), which
655659 # we received in 4 seconds, so we have an input period of 6/7s.
656660 assert source_props == SourceProperties (
657- sampling_start = timestamp , received_samples = 7 , sampling_period_s = 6 / 7
661+ sampling_start = timestamp ,
662+ received_samples = 7 ,
663+ sampling_period = timedelta (seconds = 6 / 7 ),
658664 )
659665 # The buffer should be able to hold 2 * 1.5 (3) seconds of data, and data
660666 # is coming every 6/7 seconds (~0.857s), so we should be able to store
@@ -693,7 +699,9 @@ async def test_resampling_with_one_and_a_half_windows( # pylint: disable=too-ma
693699 current_iteration = 5 ,
694700 )
695701 assert source_props == SourceProperties (
696- sampling_start = timestamp , received_samples = 7 , sampling_period_s = 6 / 7
702+ sampling_start = timestamp ,
703+ received_samples = 7 ,
704+ sampling_period = timedelta (seconds = 6 / 7 ),
697705 )
698706 assert _get_buffer_len (resampler , source_recvr ) == 4
699707
@@ -755,7 +763,7 @@ async def test_resampling_with_two_windows( # pylint: disable=too-many-statemen
755763 a_sequence (sample0s , sample1s ), config , source_props
756764 )
757765 assert source_props == SourceProperties (
758- sampling_start = timestamp , received_samples = 2 , sampling_period_s = None
766+ sampling_start = timestamp , received_samples = 2 , sampling_period = None
759767 )
760768 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
761769 sink_mock .reset_mock ()
@@ -783,7 +791,7 @@ async def test_resampling_with_two_windows( # pylint: disable=too-many-statemen
783791 a_sequence (sample1s , sample2_5s , sample3s , sample4s ), config , source_props
784792 )
785793 assert source_props == SourceProperties (
786- sampling_start = timestamp , received_samples = 5 , sampling_period_s = None
794+ sampling_start = timestamp , received_samples = 5 , sampling_period = None
787795 )
788796 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
789797 sink_mock .reset_mock ()
@@ -811,7 +819,7 @@ async def test_resampling_with_two_windows( # pylint: disable=too-many-statemen
811819 source_props ,
812820 )
813821 assert source_props == SourceProperties (
814- sampling_start = timestamp , received_samples = 7 , sampling_period_s = None
822+ sampling_start = timestamp , received_samples = 7 , sampling_period = None
815823 )
816824 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
817825 sink_mock .reset_mock ()
@@ -833,7 +841,7 @@ async def test_resampling_with_two_windows( # pylint: disable=too-many-statemen
833841 a_sequence (sample5s , sample6s ), config , source_props
834842 )
835843 assert source_props == SourceProperties (
836- sampling_start = timestamp , received_samples = 7 , sampling_period_s = None
844+ sampling_start = timestamp , received_samples = 7 , sampling_period = None
837845 )
838846 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
839847 sink_mock .reset_mock ()
@@ -849,7 +857,7 @@ async def test_resampling_with_two_windows( # pylint: disable=too-many-statemen
849857 current_iteration = 5 ,
850858 )
851859 assert source_props == SourceProperties (
852- sampling_start = timestamp , received_samples = 7 , sampling_period_s = None
860+ sampling_start = timestamp , received_samples = 7 , sampling_period = None
853861 )
854862 assert _get_buffer_len (resampler , source_recvr ) == config .initial_buffer_len
855863
0 commit comments