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

Fail on read errors #178

Merged
merged 5 commits into from
Dec 7, 2016
Merged

Fail on read errors #178

merged 5 commits into from
Dec 7, 2016

Conversation

orangejulius
Copy link
Member

The importer previously wasn't very strict about actually doing something about errors while reading files. It would swallow errors from failing to parse JSON, and not log anything extra when it couldn't read a file. Now it halts on both cases with error messages.

This took some changing to our little test_stream function, which is now getting complex enough I think we should move it to its own package soon. Additionally I had to move t.end() to the actual end of the callbacks from the stream, after stdout interception is stopped, or we can't properly track error output in the next test. I'd love to hear if anyone has ideas to make the test code cleaner, but I think it's ok.

In order to assert that code properly handles errors emitted in the
stream being tested, test_stream now supports an optional error handling
callback.
Previously, the import would continue with just that file being skipped.
@orangejulius orangejulius self-assigned this Dec 6, 2016
@orangejulius orangejulius merged commit 57a95e6 into master Dec 7, 2016
@orangejulius orangejulius deleted the fail-on-read-errors branch December 21, 2016 16:48
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.

2 participants