Conversation
graingert
commented
Apr 21, 2022
| assert adapt.interval == 5 | ||
| assert adapt.wait_count == 8 | ||
| try: | ||
| adapt = Adaptive(interval="5s") |
Member
Author
There was a problem hiding this comment.
Adaptive starts a PeriodicCallback - and so needs to be created in a gen_test()
| @gen_test() | ||
| async def test_server_status_is_always_enum(): | ||
| """Assignments with strings is forbidden""" | ||
| server = Server({}) |
Member
Author
There was a problem hiding this comment.
Server calls IOLoop.current() in the constructor
|
|
||
|
|
||
| @gen_test() | ||
| async def test_server_raises_on_blocked_handlers(loop): |
Member
Author
There was a problem hiding this comment.
using the loop fixture in a gen_test() test is redundant
| assert p.address is None | ||
| @gen_test() | ||
| async def test_address_default_none(): | ||
| async with ProcessInterface() as p: |
Member
Author
There was a problem hiding this comment.
ProcessInterface calls asyncio.Lock() and asyncio.Event() in the constructor - which call get_event_loop() in py3.8-3.9
Member
|
These seem innocuous to me. Tests pass. Merging. Thanks @graingert |
3 tasks
4 tasks
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.
when using
asyncio.runingen_testtest that later callasyncio.get_event_loop()fail - even before python3.10:gen_testfor tests that acquireIOLoop.current()get_running_loop()instead ofget_event_loop()asyncio.run()instead ofasyncio.get_event_loop().run_until_complete()pre-commit run --all-files