Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_navd: parameterize random test #31376

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
parameterized
  • Loading branch information
jnewb1 committed Feb 8, 2024
commit 63958a7afe3e67a637b7d46ebb027b6283406a3a
10 changes: 5 additions & 5 deletions selfdrive/navd/tests/test_navd.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def test_simple(self):
}
self._check_route(start, end)

def test_random(self):
for _ in range(10):
start = {"latitude": random.uniform(-90, 90), "longitude": random.uniform(-180, 180)}
end = {"latitude": random.uniform(-90, 90), "longitude": random.uniform(-180, 180)}
self._check_route(start, end, check_coords=False)
@parameterized.expand(range(10))
def test_random(self, index):
start = {"latitude": random.uniform(-90, 90), "longitude": random.uniform(-180, 180)}
end = {"latitude": random.uniform(-90, 90), "longitude": random.uniform(-180, 180)}
self._check_route(start, end, check_coords=False)


if __name__ == "__main__":
Expand Down