File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import json
66import logging
77import shlex
8+ import sys
89import tarfile
910import time
1011import uuid
@@ -1786,7 +1787,8 @@ def ClientSession(self) -> _BlockingSession:
17861787 with pytest .raises (asyncio .CancelledError ) as exc_info :
17871788 await task
17881789
1789- assert exc_info .value .args == ("connect-cancel" ,)
1790+ if sys .version_info >= (3 , 11 ):
1791+ assert exc_info .value .args == ("connect-cancel" ,)
17901792 assert task .cancelled ()
17911793
17921794 assert fake_aiohttp .session is not None
@@ -1838,7 +1840,8 @@ def ClientSession(self) -> _TimeoutSession:
18381840 with pytest .raises (asyncio .CancelledError ) as exc_info :
18391841 await task
18401842
1841- assert exc_info .value .args == ("cleanup-cancel" ,)
1843+ if sys .version_info >= (3 , 11 ):
1844+ assert exc_info .value .args == ("cleanup-cancel" ,)
18421845 assert fake_aiohttp .session is not None
18431846 assert fake_aiohttp .session ._closed
18441847 assert session ._pty_sessions == {}
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33import asyncio
4+ import sys
45
56import pytest
67
@@ -62,7 +63,8 @@ async def cleanup() -> None:
6263 with pytest .raises (asyncio .CancelledError ) as exc_info :
6364 await task
6465
65- assert exc_info .value .args == ("route-A" ,)
66+ if sys .version_info >= (3 , 11 ):
67+ assert exc_info .value .args == ("route-A" ,)
6668
6769
6870@pytest .mark .asyncio
You can’t perform that action at this time.
0 commit comments