13 lines
387 B
Python
13 lines
387 B
Python
import sys
|
|
sys.path.insert(0, "/root/troupe-standup/wizard-work/beam")
|
|
from intervals import merge, total_covered, find_gaps
|
|
|
|
def main():
|
|
# smoke
|
|
assert merge([(1,4),(3,6),(8,10)]) == [(1,6),(8,10)]
|
|
assert total_covered([(1,4),(3,6)]) == 5
|
|
assert find_gaps([(1,3),(5,7)], 0, 8) == [(0,1),(3,5),(7,8)]
|
|
print("intervals smoke OK")
|
|
|
|
if __name__ == "__main__":
|
|
main() |