From 8e3a258fd22f98fab37dd14ba33af5630935f6d3 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Tue, 18 Jul 2023 18:08:17 +0200 Subject: [PATCH] Fix sometimes failing backup test --- tests/test_core/test_core_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_core/test_core_project.py b/tests/test_core/test_core_project.py index 2355cd4f..27c8153f 100644 --- a/tests/test_core/test_core_project.py +++ b/tests/test_core/test_core_project.py @@ -704,9 +704,9 @@ def testCoreProject_Backup(monkeypatch, mockGUI, fncPath, tstPaths): assert theProject.backupProject(doNotify=True) is True theFiles = list((tstPaths.tmpDir / "Test Minimal").iterdir()) - assert len(theFiles) == 1 + assert len(theFiles) in (1, 2) # Sometimes 2 due to clock tick - theZip = theFiles[0].name + theZip = theFiles[-1].name assert theZip[:12] == "Backup from " assert theZip[-4:] == ".zip"