Skip to content

Commit df32990

Browse files
committed
Better period calculation.
1 parent be2bdf9 commit df32990

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/test_priority.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ def test_period_of_repetition(self, streams_and_weights):
5757
p.insert_stream(stream_id=stream, weight=weight)
5858
weights.append(weight)
5959

60-
if weights:
61-
period = sum(weights) // reduce(gcd, weights)
62-
else:
63-
period = 0
60+
period = sum(weights)
6461

6562
# Pop off the first n elements, which will always be evenly
6663
# distributed.

0 commit comments

Comments
 (0)