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

issue #355 - add better exceptions when encountering invalid json #358

Closed

Conversation

rsyring
Copy link

@rsyring rsyring commented Dec 29, 2014

addresses issue #355

@michaeljoseph
Copy link
Contributor

@rsyring thanks for the code 😀
Please have a look at the failing travisci tests: https://travis-ci.org/audreyr/cookiecutter/builds/45318583

with pytest.raises(ContextDecodingException) as excinfo:
generate.generate_context('tests/test-generate-context/invalid-syntax.json')
# original message from json module should be included
assert 'Decoding error details: "Expecting : delimiter: line 1 column 20 (char 19)"' in \
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's enough that the exception was thrown?
That error message isn't guaranteed to stay the same across the python versions we care about.

@rsyring
Copy link
Author

rsyring commented Feb 11, 2015

replaced by #388

@rsyring rsyring closed this Feb 11, 2015
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.

None yet

3 participants