Skip to content

Commit 3579816

Browse files
test(streamable-http): use branch-free assertion for py311 coverage
1 parent e43de6c commit 3579816

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/shared/test_streamable_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import socket
1111
import time
1212
import traceback
13+
import unittest
1314
from collections.abc import AsyncIterator, Generator
1415
from contextlib import asynccontextmanager
1516
from dataclasses import dataclass, field
@@ -1848,8 +1849,7 @@ async def exercise_client() -> None:
18481849

18491850
anyio.run(exercise_client)
18501851

1851-
if start_count != 1:
1852-
raise AssertionError(f"Expected exactly one GET stream start, got {start_count}")
1852+
unittest.TestCase().assertEqual(start_count, 1, f"Expected exactly one GET stream start, got {start_count}")
18531853

18541854

18551855
@pytest.mark.anyio

0 commit comments

Comments
 (0)