def atl(softioc, caclient, tmpdir_factory): AbortCh.fields['ACNT'] = ':ACNT' AbortCh.fields['TCNT'] = ':TCNT' dburi = ('sqlite:///' + str(tmpdir_factory.mktemp('data').join('testdata.db')) ) insert_current_pv_mock(dburi) set_initial_abort_state() atl = Aborttl(dburi, 'ET_dummyHost:RESETw') thread = CAThread(target=atl.run) thread.daemon = True thread.start() time.sleep(5) yield atl atl.stop() thread.join() time.sleep(1)