File tree 1 file changed +7
-1
lines changed
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):
51
51
assert anasig .shape == (30000 , 8 )
52
52
assert_same_attributes (proxy_anasig .time_slice (2. * pq .s , 5 * pq .s ), anasig )
53
53
54
- # ceil next sample when slicing
54
+ # round up next sample when slicing
55
55
anasig = proxy_anasig .load (time_slice = (1.99999 * pq .s , 5.000001 * pq .s ))
56
56
assert anasig .t_start == 2. * pq .s
57
57
assert anasig .duration == 3. * pq .s
58
58
assert anasig .shape == (30000 , 8 )
59
59
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
+
60
66
# buggy time slice
61
67
with self .assertRaises (AssertionError ):
62
68
anasig = proxy_anasig .load (time_slice = (2. * pq .s , 15 * pq .s ))
You can’t perform that action at this time.
0 commit comments