Skip to content

Commit

Permalink
Add leeway to smoke_test.py for random point around circle
Browse files Browse the repository at this point in the history
  • Loading branch information
Gtker committed Sep 6, 2023
1 parent aa1f0bb commit 6878747
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/smoke_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ def compute_path_length(path):

(x, y, z) = should_pass
distance = math.dist(origin, [x, y, z])
if distance > radius:
# According to docs "The location is not exactly constrained by the circle"
# so we add some leeway
distance_leeway = 5.0
if distance + distance_leeway > radius:
raise Exception(f"find random point around circle distance greater than radius, \
origin: {{x: {origin[0]}, y: {origin[1]}, z: {origin[2]} }} \
random_point: {{ x: {x}, y: {y}, z: {z} }} \
Expand Down

0 comments on commit 6878747

Please sign in to comment.