mirror of
https://github.com/borgbase/vorta
synced 2025-01-03 13:45:49 +00:00
parent
62a3c6e42b
commit
a86683e2b8
1 changed files with 11 additions and 0 deletions
|
@ -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 a new issue