File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66from unittest import mock
77
88if sys .version_info < (3 , 11 ):
9- from exceptiongroup import BaseExceptionGroup # noqa: A004
9+ from exceptiongroup import BaseExceptionGroup # pragma: no cover # noqa: A004
1010
1111import httpx
1212import pytest
@@ -418,10 +418,10 @@ def _walk(e: BaseException | None) -> bool:
418418 return False
419419 seen .add (id (e ))
420420 if isinstance (e , RuntimeError ) and "cancel scope" in str (e ).lower ():
421- return True
421+ return True # pragma: no cover
422422 if isinstance (e , BaseExceptionGroup ):
423- if any (_walk (child ) for child in e .exceptions ): # type: ignore
424- return True
423+ if any (_walk (child ) for child in e .exceptions ): # type: ignore # pragma: no cover
424+ return True # pragma: no cover
425425 return _walk (e .__cause__ ) or _walk (e .__context__ )
426426
427427 return _walk (exc )
@@ -447,7 +447,7 @@ async def test_unreachable_streamable_http_error_is_catchable() -> None:
447447 except BaseException as inner :
448448 # Expected post-fix: real ConnectError lands here.
449449 caught = inner
450- except BaseException as outer :
450+ except BaseException as outer : # pragma: no cover
451451 # If we land here, the error escaped past the inner handler --
452452 # that is the regression case (masking RuntimeError surfacing
453453 # from __aexit__ instead of the real ConnectError propagating).
You can’t perform that action at this time.
0 commit comments