You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm planning to rely completely on asyncio for ST4 and LSP, and I want to be able to run tests with asyncio.
I'm envisioning this possibility:
frommy_packageimportget_my_custom_loopfromunittestingimportAsyncTestCaseimportasyncioclassMyTestSuite(AsyncTestCase):
# customization point: allow the user to define its own loop# if this function is not overridden, UnitTesting should provide its own loopdefget_running_loop(self) ->asyncio.AbstractEventLoop:
returnget_my_custom_loop()
# customization point: are the tests in this suite allowed to run all at once or one after the other?defallowed_to_run_parallel(self) ->bool:
returnFalse# customization point if get_running_loop is overridden: we want to know if the loop is running on the UI thread# or notdefloop_is_on_main_thread(self) ->bool:
returnFalse# an actual testasyncdeftest_foo(self) ->None:
awaitasyncio.sleep(1)
self.assertTrue(True)
I'm planning to rely completely on asyncio for ST4 and LSP, and I want to be able to run tests with asyncio.
I'm envisioning this possibility:
See also: sublimehq/sublime_text#3129
The text was updated successfully, but these errors were encountered: