File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,19 @@ def test_stream_repr(self):
4242 assert repr (s ) == "Stream<id=80, weight=16>"
4343
4444
45- class TestPriorityTree (object ):
45+ class TestPriorityTreeOutput (object ):
46+ """
47+ These tests use Hypothesis to attempt to bound the output of iterating over
48+ the priority tree. In particular, their goal is to ensure that the output
49+ of the tree is "good enough": that it meets certain requirements on
50+ fairness and equidistribution.
51+ """
4652 @given (STREAMS_AND_WEIGHTS )
4753 def test_period_of_repetition (self , streams_and_weights ):
4854 """
49- The period of repetition of a priority sequence is given by the
50- formula: sum( weights) / gcd(weights) . Once that many values have been
51- pulled out, the sequence should repeat identically.
55+ The period of repetition of a priority sequence is given by the sum of
56+ the weights of the streams . Once that many values have been pulled out
57+ the sequence repeats identically.
5258 """
5359 p = priority .PriorityTree ()
5460 weights = []
You can’t perform that action at this time.
0 commit comments