Skip to content
Myr

fix iterator in testsuite helpers

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

authored by Thomas Waldmann · committed by Thomas Waldmann · parent 8bb972e · Browse files · 1 file+3 added−2 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+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:flask/testsuite/helpers.py+3 added-2 removed
13 unmodified lines
14import unittest15from logging import StreamHandler16from flask.testsuite import FlaskTestCase, catch_warnings, catch_stderr17from werkzeug.http import parse_cache_control_header, parse_options_header18from flask._compat import StringIO, text_type18from flask._compat import StringIO, text_type, implements_iterator192021def has_encoding(name):22 try:
461 unmodified lines
484 def test_streaming_with_context_and_custom_close(self):485 app = flask.Flask(__name__)486 app.testing = True487 called = []488 @implements_iterator489 class Wrapper(object):490 def __init__(self, gen):491 self._gen = gen492 def __iter__(self):493 return self494 def close(self):495 called.append(42)495 def next(self):496 def __next__(self):497 return next(self._gen)498 @app.route('/')499 def index():500 def generate():
20 unmodified lines