diff --git a/tests/test_async_py3.py b/tests/test_async_py3.py index dba934f..992569c 100644 --- a/tests/test_async_py3.py +++ b/tests/test_async_py3.py @@ -133,7 +133,7 @@ async def foo(): pass with check(): - [i for i in coro] + list(coro) coro.close() @@ -157,7 +157,7 @@ async def foo(): # the following should pass without an error for el in lop.Proxy(bar): assert el == 1 - assert [el for el in lop.Proxy(bar)] == [1] + assert list(lop.Proxy(bar)) == [1] assert tuple(lop.Proxy(bar)) == (1,) assert next(iter(lop.Proxy(bar))) == 1 @@ -1090,7 +1090,7 @@ async def test2(): # Make sure that __aiter__ was called only once assert aiter_calls == 2 assert yielded == [100, 200] - assert buffer == [i for i in range(1, 21)] + ['end'] + assert buffer == list(range(1, 21)) + ['end'] buffer = [] @@ -1108,7 +1108,7 @@ async def test3(): # Make sure that __aiter__ was called only once assert aiter_calls == 3 assert yielded == [i * 100 for i in range(1, 11)] - assert buffer == [i for i in range(1, 21)] + \ + assert buffer == list(range(1, 21)) + \ ['what?', 'end'] @@ -1570,7 +1570,7 @@ async def run_list(): def test_comp_8(lop): async def f(): - return [i for i in [1, 2, 3]] + return list([1, 2, 3]) assert run_async(f()) == \ ([], [1, 2, 3]) @@ -1583,7 +1583,7 @@ async def gen(): async def f(): l = [i async for i in gen()] - return [i for i in l] + return list(l) assert run_async(f()) == \ ([], [1, 2]) @@ -1591,7 +1591,7 @@ async def f(): def test_comp_10(lop): async def f(): - xx = {i for i in [1, 2, 3]} + xx = {1, 2, 3} return {x: x for x in xx} assert run_async(f()) == \ diff --git a/tests/test_lazy_object_proxy.py b/tests/test_lazy_object_proxy.py index 879539a..d9755f8 100644 --- a/tests/test_lazy_object_proxy.py +++ b/tests/test_lazy_object_proxy.py @@ -779,7 +779,7 @@ def test_iteration(lop): wrapper = lop.Proxy(lambda: items) - result = [x for x in wrapper] + result = list(wrapper) assert result == items pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy