Anonymous user
Talk:Range consolidation: Difference between revisions
→Python tester: handle case where algorithm could generate new, wrong, ranges.
m (→Python tester: sp.) |
(→Python tester: handle case where algorithm could generate new, wrong, ranges.) |
||
Line 49:
for tp in (bound - gen_grid / 2, bound, bound + gen_grid / 2):
testpoint.add(tp)
return
def in_a_range(testpoints, ranges):
Line 69:
consolidated = consolidate(ranges)
tp = gen_test_points(ranges)
tp |= gen_test_points(consolidated) # tp around all boundaries
good = (len(consolidated) <= len(ranges)
and in_a_range(tp, ranges) == in_a_range(tp, consolidated))
|