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

Use a Jinja filter to provide repr in test templates. #1744

Merged
merged 2 commits into from
Dec 19, 2018

Conversation

zerebubuth
Copy link
Member

Previously, was just quoting everything as a unicode string, which was good enough in 99% of cases. However, sometimes it's nice to be able to round-trip values from the command line --expect, which takes a JSON-encoded dict, and the test. For example, not having it quote min_zoom as a string when I specified it as a number.

As a bonus, I also de-unicode strings where they can be specified as plain str, which is the case for all the keys and most of the values that we have in our tests, and makes the output slightly more readable.

@zerebubuth zerebubuth merged commit aadc689 into master Dec 19, 2018
@zerebubuth zerebubuth deleted the zerebubuth/test-generator-repr branch December 19, 2018 18: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.

3 participants