def ensure_not_ui_thread():

    if isinstance(threading.current_thread(), threading._MainThread):
        raise RuntimeError('Tests can not be run in the UI thread')
The tests won't function properly if they are run in the UI thread, so
dataset/ETHPy150Open golang/sublime-build/dev/tests.py/ensure_not_ui_thread