I am writing a test where i need to open a file and assert some operation but the issue is sublime.active_window().open_file
opens file async due to which i have to loop and check whether the view is created or not.
Is there any better way to do this? because of this looping on view.is_loading
sometimes freezes up the whole test run.
test_file_view = sublime.active_window().open_file(
fname='test_fixture.py'
)
)
# wait for view to open
while test_file_view.is_loading():
pass