diff --git a/flask/testsuite/ext.py b/flask/testsuite/ext.py index 3c75540e..5ec6ec63 100644 --- a/flask/testsuite/ext.py +++ b/flask/testsuite/ext.py @@ -125,7 +125,9 @@ class ExtImportHookTestCase(FlaskTestCase): next = tb.tb_next.tb_next if not PY2: next = next.tb_next - self.assert_in('flask_broken/__init__.py', next.tb_frame.f_code.co_filename) + + import os.path + self.assert_in(os.path.join('flask_broken', '__init__.py'), next.tb_frame.f_code.co_filename) def suite(): diff --git a/flask/testsuite/helpers.py b/flask/testsuite/helpers.py index d596a747..38c1ceef 100644 --- a/flask/testsuite/helpers.py +++ b/flask/testsuite/helpers.py @@ -269,7 +269,7 @@ class SendfileTestCase(FlaskTestCase): app = flask.Flask(__name__) with catch_warnings() as captured: with app.test_request_context(): - f = open(os.path.join(app.root_path, 'static/index.html')) + f = open(os.path.join(app.root_path, 'static/index.html'), mode='rb') rv = flask.send_file(f) rv.direct_passthrough = False with app.open_resource('static/index.html') as f: