Update test

This commit is contained in:
Veronica Berglyd Olsen
2023-07-27 00:12:25 +02:00
parent ace037808f
commit 0c04b0ba86
+4 -4
View File
@@ -620,12 +620,12 @@ def testCoreProject_Backup(monkeypatch, mockGUI, fncPath, tstPaths):
theFiles = list((tstPaths.tmpDir / "Test Minimal").iterdir())
assert len(theFiles) in (1, 2) # Sometimes 2 due to clock tick
theZip = theFiles[-1].name
assert theZip[:12] == "Backup from "
assert theZip[-4:] == ".zip"
theZip = theFiles[-1]
assert theZip.name.startswith("Test Minimal")
assert theZip.suffix == ".zip"
# Extract the archive
with ZipFile(tstPaths.tmpDir / "Test Minimal" / theZip, mode="r") as inZip:
with ZipFile(tstPaths.tmpDir / "Test Minimal" / theZip.name, mode="r") as inZip:
inZip.extractall(tstPaths.tmpDir / "extract")
# Check that the main project file was restored