def test_repetitions_stopping_criteria(): stop = cw.RepetitionsStoppingCriteria(total_repetitions=50_000) acc = _MockBitstringAccumulator() todos = [stop.more_repetitions(acc)] for _ in range(6): acc.consume_results(np.zeros((10_000, 5), dtype=np.uint8))
def test_repetitions_stopping_criteria_partial(): stop = cw.RepetitionsStoppingCriteria(total_repetitions=5_000, repetitions_per_chunk=1_000_000) acc = _MockBitstringAccumulator() assert stop.more_repetitions(acc) == 5_000