Skip to content

Conversation

@njgheorghita
Copy link
Contributor

Add fixtures testing manifest formatting rules

@njgheorghita njgheorghita marked this pull request as ready for review May 13, 2020 22:36

sorted_manifest = json.dumps(manifest_dict, sort_keys=True, separators=(",", ":"))
if raw_manifest != sorted_manifest:
raise Exception("Invalid manifest has unsorted keys, duplicate keys, or is not tightly packed.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems non-trivial to get more precise testing for these different cases, so I just lumped them together for now. But I can look into enhancing this test to explicitly cover each test case if it seems worthwhile. The "reason" in each fixture is more precise in what the particular cause of error is.

@njgheorghita njgheorghita requested a review from pipermerriam May 13, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant