File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,18 @@ def test_AnalogSignalProxy(self):
5151 assert anasig .shape == (30000 , 8 )
5252 assert_same_attributes (proxy_anasig .time_slice (2. * pq .s , 5 * pq .s ), anasig )
5353
54- # ceil next sample when slicing
54+ # round up next sample when slicing
5555 anasig = proxy_anasig .load (time_slice = (1.99999 * pq .s , 5.000001 * pq .s ))
5656 assert anasig .t_start == 2. * pq .s
5757 assert anasig .duration == 3. * pq .s
5858 assert anasig .shape == (30000 , 8 )
5959
60+ # round down sample test
61+ anasig = proxy_anasig .load (time_slice = (2.00001 * pq .s , 4.99999 * pq .s ))
62+ assert anasig .t_start == 2. * pq .s
63+ assert anasig .duration == 3. * pq .s
64+ assert anasig .shape == (30000 , 8 )
65+
6066 # buggy time slice
6167 with self .assertRaises (AssertionError ):
6268 anasig = proxy_anasig .load (time_slice = (2. * pq .s , 15 * pq .s ))
You can’t perform that action at this time.
0 commit comments