Skip to content

Commit 9e9aab4

Browse files
committed
update test cases
1 parent a39be08 commit 9e9aab4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/transport/aio/test_aiohttp.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ async def test_timeout_with_single_async_task_out_of_bounds(self, simple_async_t
4747
with pytest.raises(TimeoutError) as exc:
4848
async with self.make_timeout_guard(timeout=0.1) as with_timeout:
4949
task = await with_timeout(simple_async_task)
50+
# Task succeeds but the context manager times out i.e. no remaining time left.
51+
assert task is True
5052

51-
# Task succeeds but the context manager times out i.e. no remaining time left.
52-
assert task is True
5353
assert exc.match("Context manager exceeded the configured timeout of 0.1s.")
5454

5555
@pytest.mark.asyncio
@@ -72,10 +72,11 @@ async def test_timeout_with_multiple_async_tasks_out_of_bounds(self, simple_asyn
7272
# First task succeeds
7373
task_1 = await with_timeout(simple_async_task)
7474
task_2 = await with_timeout(long_running_async_task)
75+
76+
# Tasks succeed but the context manager times out i.e. no remaining time left.
77+
assert task_1 is True
78+
assert task_2 is True
7579

76-
# Tasks succeed but the context manager times out i.e. no remaining time left.
77-
assert task_1 is True
78-
assert task_2 is True
7980
assert exc.match("Context manager exceeded the configured timeout of 0.4s.")
8081

8182
@pytest.mark.asyncio

0 commit comments

Comments
 (0)