twitter-algorithm-ml/reader/test_utils.py

11 lines
211 B
Python
Raw Normal View History

import tml.reader.utils as reader_utils
def test_rr():
options = ["a", "b", "c"]
rr = reader_utils.roundrobin(options)
for i, v in enumerate(rr):
assert v == options[i % 3]
if i > 4:
break