WIP
This commit is contained in:
parent
e77bc2d86c
commit
d0cf5ef394
6 changed files with 497 additions and 520 deletions
|
|
@ -90,25 +90,6 @@ class TestFlask(object):
|
|||
consistency.
|
||||
"""
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_path(self, monkeypatch):
|
||||
monkeypatch.syspath_prepend(
|
||||
os.path.abspath(os.path.join(
|
||||
os.path.dirname(__file__), 'test_apps'))
|
||||
)
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def leak_detector(self, request):
|
||||
request.addfinalizer(self.ensure_clean_request_context)
|
||||
|
||||
def ensure_clean_request_context(self):
|
||||
# make sure we're not leaking a request context since we are
|
||||
# testing flask internally in debug mode in a few cases
|
||||
leaks = []
|
||||
while flask._request_ctx_stack.top is not None:
|
||||
leaks.append(flask._request_ctx_stack.pop())
|
||||
assert leaks == []
|
||||
|
||||
def setup_method(self, method):
|
||||
self.setup()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue