toga icon indicating copy to clipboard operation
toga copied to clipboard

Add asyncio networking test to testbed

Open mhsmith opened this issue 1 year ago • 1 comments

From #2481:

[@mhsmith] Should we add a test to the Toga testbed to cover asyncio network access, since both Android and WinForms have their event loop implementations in this repository?

[@freakboy3742] It certainly couldn't hurt. We're doing enough wrangling with asyncio event loop integration that it would be worth verifying explicitly that those integrations are working in all the ways we need them to.

[@mhsmith] And if there is no such test, why are large parts of AndroidSelector already covered?

[@freakboy3742] That I can't explain. My guess would be that there's something we're doing implicitly in the test suite that is setting a selector on a file descriptor (maybe something in pytest-asyncio?), which is enough to gather coverage.

mhsmith avatar Apr 15 '24 23:04 mhsmith

For some example code, see https://github.com/beeware/rubicon-java/pull/49.

mhsmith avatar Apr 15 '24 23:04 mhsmith