Skip to content

[skip changelog] Fix flaky board details test #682

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

Merged
merged 1 commit into from
May 4, 2020
Merged
Changes from all commits
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
15 changes: 12 additions & 3 deletions test/test_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,15 @@ def test_board_details(run_command):
result = run_command("board details arduino:samd:nano_33_iot --format json")
assert result.ok
# Sort everything before compare
sorted_result = json.dumps(json.loads(result.stdout), sort_keys=True)
sorted_gold_board_details = json.dumps(json.loads(gold_board_details), sort_keys=True)
assert sorted_result == sorted_gold_board_details
result = json.loads(result.stdout)
gold_board_details = json.loads(gold_board_details)

assert result["fqbn"] == gold_board_details["fqbn"]
assert result["name"] == gold_board_details["name"]
assert result["version"] == gold_board_details["version"]
assert result["propertiesId"] == gold_board_details["propertiesId"]
assert result["official"] == gold_board_details["official"]
assert result["package"] == gold_board_details["package"]
assert result["platform"] == gold_board_details["platform"]
for usb_id in gold_board_details["identification_pref"]:
assert usb_id in result["identification_pref"]