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

Minor test fixes #862

Merged
merged 2 commits into from Mar 21, 2014
Merged

Minor test fixes #862

merged 2 commits into from Mar 21, 2014

Conversation

mbikovitsky
Copy link

  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.

Michael Bikovitsky added 2 commits September 7, 2013 18:21
Path in assertion is now cross-platform.
static/index.html now opens in binary mode, and therefore newline conversion does not take place.
@kennethreitz
Copy link
Contributor

✨ 🍰 ✨

kennethreitz added a commit that referenced this pull request Mar 21, 2014
@kennethreitz kennethreitz merged commit 4c0253f into pallets:master Mar 21, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants