@@ -593,13 +593,13 @@ def test_count(self):
593593 endpoint .alignedWindows = Mock (return_value = windows )
594594 stream = Stream (btrdb = BTrDB (endpoint ), uuid = uu )
595595
596- assert stream .count () == 26
596+ assert stream .count (precise = False , version = 0 ) == 26
597597 stream ._btrdb .ep .alignedWindows .assert_called_once_with (
598- uu , MINIMUM_TIME , MAXIMUM_TIME , 62 , 0
598+ uu , MINIMUM_TIME , MAXIMUM_TIME , 60 , 0
599599 )
600600
601- stream .count (10 , 1000 , 48 , 1200 )
602- stream ._btrdb .ep .alignedWindows .assert_called_with (uu , 10 , 1000 , 48 , 1200 )
601+ stream .count (10 , 1000 , 8 , version = 1200 )
602+ stream ._btrdb .ep .alignedWindows .assert_called_with (uu , 10 , 1000 , 8 , 1200 )
603603
604604
605605 ##########################################################################
@@ -1226,8 +1226,8 @@ def test_count(self):
12261226 ])
12271227
12281228 assert streams .count () == 52
1229- endpoint .alignedWindows .assert_any_call (uu1 , MINIMUM_TIME , MAXIMUM_TIME , 62 , 0 )
1230- endpoint .alignedWindows .assert_any_call (uu2 , MINIMUM_TIME , MAXIMUM_TIME , 62 , 0 )
1229+ endpoint .alignedWindows .assert_any_call (uu1 , MINIMUM_TIME , MAXIMUM_TIME , 60 , 0 )
1230+ endpoint .alignedWindows .assert_any_call (uu2 , MINIMUM_TIME , MAXIMUM_TIME , 60 , 0 )
12311231
12321232
12331233 def test_count_filtered (self ):
@@ -1242,14 +1242,18 @@ def test_count_filtered(self):
12421242 Stream (btrdb = BTrDB (endpoint ), uuid = uu1 ),
12431243 Stream (btrdb = BTrDB (endpoint ), uuid = uu2 ),
12441244 ])
1245+ windows = [
1246+ [(StatPointProto (time = 1 ,min = 2 ,mean = 3 ,max = 4 ,count = 5 ,stddev = 6 ), StatPointProto (time = 2 ,min = 3 ,mean = 4 ,max = 5 ,count = 6 ,stddev = 7 )), 42 ],
1247+ [(StatPointProto (time = 3 ,min = 4 ,mean = 5 ,max = 6 ,count = 7 ,stddev = 8 ), StatPointProto (time = 4 ,min = 5 ,mean = 6 ,max = 7 ,count = 8 ,stddev = 9 )), 42 ],
1248+ ]
1249+ endpoint .alignedWindows = Mock (return_value = windows )
12451250
12461251 streams = streams .filter (start = 10 , end = 1000 )
12471252 streams .pin_versions ({uu1 : 42 , uu2 : 99 })
1248- streams .pointwidth = 48
12491253
12501254 streams .count ()
1251- endpoint .alignedWindows .assert_any_call (uu1 , 10 , 1000 , 48 , 42 )
1252- endpoint .alignedWindows .assert_any_call (uu2 , 10 , 1000 , 48 , 99 )
1255+ endpoint .alignedWindows .assert_any_call (uu1 , 10 , 1000 , 8 , 42 )
1256+ endpoint .alignedWindows .assert_any_call (uu2 , 10 , 1000 , 8 , 99 )
12531257
12541258
12551259
0 commit comments