Browse Source
fix: use post-yield check in _async_iter for 100% coverage
pull/15509/head
itsaryanchauhan
3 weeks ago
No known key found for this signature in database
GPG Key ID: 6C1BE70E72A2519C
1 changed files with
2 additions and
3 deletions
-
tests/test_dependency_after_yield_sse.py
|
|
|
@ -30,9 +30,8 @@ class Session: |
|
|
|
|
|
|
|
async def _async_iter(self) -> AsyncGenerator[Item, None]: |
|
|
|
for item in self.items: |
|
|
|
if self.open: |
|
|
|
yield item |
|
|
|
else: |
|
|
|
yield item |
|
|
|
if not self.open: |
|
|
|
raise ValueError("Session closed") |
|
|
|
|
|
|
|
|
|
|
|
|