mirror of https://github.com/borgbase/vorta
parent
62a3c6e42b
commit
a86683e2b8
|
@ -52,6 +52,17 @@ def local_en():
|
|||
os.environ['LANG'] = 'en'
|
||||
|
||||
|
||||
@pytest.fixture(scope='function', autouse=True)
|
||||
def cleanup(request, qapp, qtbot):
|
||||
"""
|
||||
Ensure BorgThread is stopped when new test starts.
|
||||
"""
|
||||
def ensure_borg_thread_stopped():
|
||||
qapp.backup_cancelled_event.emit()
|
||||
qtbot.waitUntil(lambda: not vorta.borg.borg_thread.BorgThread.is_running())
|
||||
request.addfinalizer(ensure_borg_thread_stopped)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def qapp(tmpdir_factory, local_en):
|
||||
tmp_db = tmpdir_factory.mktemp('Vorta').join('settings.sqlite')
|
||||
|
|
Loading…
Reference in New Issue