def local_test():  # pragma: no cover
    """Main local test."""
    from spyder.utils.qthelpers import qapplication
    app = qapplication()
    wm = WorkerManager(max_threads=3)
    for i in range(7):
        worker = wm.create_python_worker(sleeping_func, 'BOOM! {}'.format(i),
                                         secs=5)
        worker.sig_finished.connect(ready_print)
        worker.start()
    worker = wm.create_python_worker(sleeping_func, 'BOOM!', secs=5)
    worker.sig_finished.connect(ready_print)
    worker.start()

    worker = wm.create_process_worker(['conda', 'info', '--json'])
    worker.sig_finished.connect(ready_print)
    worker.start()
#    wm.terminate_all()
#    wm.terminate_all()

    sys.exit(app.exec_())
def local_test ( ) : from spyder . utils . qthelpers import qapplication app = qapplication ( ) wm = WorkerManager ( max_threads = 3 ) for i in range ( 7 ) : worker = wm . create_python_worker ( sleeping_func , 'BOOM! {}' . format ( i ) , secs = 5 ) worker . sig_finished . connect ( ready_print ) worker . start ( ) worker = wm . create_python_worker ( sleeping_func , 'BOOM!' , secs = 5 ) worker . sig_finished . connect ( ready_print ) worker . start ( ) worker = wm . create_process_worker ( [ 'conda' , 'info' , '--json' ] ) worker . sig_finished . connect ( ready_print ) worker . start ( ) sys . exit ( app . exec_ ( ) )
Main local test.