Skip to content
Myr

Merge branch '0.10-maintenance'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents 82f99f4, ddb5f9d · Browse files · 1 file+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:flask/testsuite/basic.py+6 added-6 removed
9 unmodified lines
10"""1112import re13import uuid14import time15import flask16import pickle17import unittest18from datetime import datetime18from threading import Thread, Condition19from threading import Thread20from flask.testsuite import FlaskTestCase, emits_module_deprecation_warning21from flask._compat import text_type22from werkzeug.exceptions import BadRequest, NotFound23from werkzeug.http import parse_date
1074 unmodified lines
10981099 def test_before_first_request_functions_concurrent(self):1100 got = []1101 app = flask.Flask(__name__)1101 cv = Condition()11021103 @app.before_first_request1104 def foo():1104 with cv:1105 cv.wait()1105 time.sleep(0.2)1106 got.append(42)11071108 c = app.test_client()1109 def get_and_assert():1109 with cv:1110 cv.notify()1110 c.get("/")1111 self.assert_equal(got, [42])11121113 t = Thread(target=get_and_assert)1114 t.start()1115 get_and_assert()1116 t.join()
239 unmodified lines