mitsuhiko/flask — pull request #862 by bikerm16 (2013-09-07 16:06:45+00:00)
Title: Minor test fixes

1. In `test_no_error_swallowing` the path is hardcoded as `'flask_broken/__init__.py'`, however on Windows `co_filename` will return `'flask_broken\\__init__.py'`, and so the assertion will fail. The fix uses `os.path.join` to generate a path suitable for the current system.

2. In `test_send_file_object` the file is first opened in text mode, which converts newlines to `\n`. However, later on the same file is opened in binary mode using `app.open_resource`, and so newlines are not converted. On Windows this leads to a failing test because Git converts all newlines to `\r\n` on checkout. Basically, when opening in text mode we get `\n` newlines, and when opening in binary mode we get `\r\n` newlines. The fix solves this by opening the file in binary mode the first time, as well.