Skip to content
Myr

Use iter instead of noop list comprehension

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

authored by Brett Higgins · committed by Brett Higgins · parent 4bf8866 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • tests:+1 added−1 removed

1 file+1 added−1 removed

modified:tests/test_lowlevel.py+1 added-1 removed
10 unmodified lines
11def test_chunked_upload():12 """can safely send generators"""13 close_server = threading.Event()14 server = Server.basic_response_server(wait_to_close_event=close_server)15 data = (i for i in [b'a', b'b', b'c'])15 data = iter([b'a', b'b', b'c'])1617 with server as (host, port):18 url = 'http://{0}:{1}/'.format(host, port)19 r = requests.post(url, data=data, stream=True)
37 unmodified lines