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

Add manifest formatting rules #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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