MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / test

Function test

Tools/Spawnpoint-Clustering/cluster.py:116–121  ·  view source on GitHub ↗
(cluster, radius, time_threshold)

Source from the content-addressed store, hash-verified

114 return clusters
115
116def test(cluster, radius, time_threshold):
117 assert cluster.max_time - cluster.min_time <= time_threshold
118
119 for p in cluster:
120 assert utils.distance(p.position, cluster.centroid) <= radius
121 assert cluster.min_time <= p.time <= cluster.max_time
122
123def main(args):
124 radius = args.radius

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected