File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -332,12 +332,12 @@ async def test_open_tcp_listeners_some_address_families_unavailable(
332
332
with pytest .raises (OSError , match = "This system doesn't support" ) as exc_info :
333
333
await open_tcp_listeners (80 , host = "example.org" )
334
334
335
- if isinstance ( exc_info . value . __cause__ , BaseExceptionGroup ):
336
- for subexc in exc_info . value . __cause__ . exceptions :
337
- assert "nope" in str ( subexc )
338
- else :
339
- assert isinstance ( exc_info .value .__cause__ , OSError )
340
- assert "nope" in str (exc_info . value . __cause__ )
335
+ # open_listeners always creates an exceptiongroup with the
336
+ # unsupported address families, regardless of the value of
337
+ # strict_exception_groups or number of unsupported families.
338
+ assert isinstance ( exc_info . value . __cause__ , BaseExceptionGroup )
339
+ for subexc in exc_info .value .__cause__ . exceptions :
340
+ assert "nope" in str (subexc )
341
341
else :
342
342
listeners = await open_tcp_listeners (80 )
343
343
for listener in listeners :
You can’t perform that action at this time.
0 commit comments