Update tests to mock new_event_loop instead of deprecated get_event_loop#493
Merged
kjy5 merged 3 commits intofix-launch-loopfrom Nov 16, 2025
Merged
Update tests to mock new_event_loop instead of deprecated get_event_loop#493kjy5 merged 3 commits intofix-launch-loopfrom
kjy5 merged 3 commits intofix-launch-loopfrom
Conversation
Co-authored-by: kjy5 <82800265+kjy5@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on request loop implementation from PR #492
Update tests to mock new_event_loop instead of deprecated get_event_loop
Nov 16, 2025
kjy5
approved these changes
Nov 16, 2025
kjy5
added a commit
that referenced
this pull request
Nov 16, 2025
* Create a loop to make requests * Update src/ephys_link/back_end/server.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/ephys_link/back_end/server.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Hatch static analysis * Update tests to mock new_event_loop instead of deprecated get_event_loop (#493) * Initial plan * Update tests to mock new_event_loop instead of get_event_loop Co-authored-by: kjy5 <82800265+kjy5@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Kenneth Yang <82800265+kjy5@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief summary of changes
tests/back_end/test_server.pyto usenew_event_loopinstead ofget_event_loop, aligning with the implementation changes inserver.pywhereget_event_loopis no longer imported or used.Notes
Three test functions were updated:
test_launch_servertest_launch_proxy_clienttest_launch_proxy_client_failed_initEach now correctly mocks
asyncio.new_event_loop()which matches the current server implementation that creates a temporary event loop for fetching manipulators.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.