Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpler definition of input_ in tests of generator coroutines #730

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tests/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ async def test_main(self, *, capsys: CaptureFixture) -> None:
async def func() -> AsyncGenerator[int | None, float | None]:
print("Initial") # noqa: T201
while True:
input_ = yield
output = round(ensure_not_none(input_))
input_ = ensure_not_none((yield))
output = round(input_)
if output >= 0:
print(f"Received {input_}, yielding {output}") # noqa: T201
yield output
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_main(self, *, capsys: CaptureFixture) -> None:
def func() -> Generator[int | None, float | None, str]:
print("Initial") # noqa: T201
while True:
input_ = yield
input_ = ensure_not_none((yield))
output = round(ensure_not_none(input_))
if output >= 0:
print(f"Received {input_}, yielding {output}") # noqa: T201
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import annotations

__version__ = "0.54.0"
__version__ = "0.54.1"