Update test
This commit is contained in:
@@ -620,12 +620,12 @@ def testCoreProject_Backup(monkeypatch, mockGUI, fncPath, tstPaths):
|
|||||||
theFiles = list((tstPaths.tmpDir / "Test Minimal").iterdir())
|
theFiles = list((tstPaths.tmpDir / "Test Minimal").iterdir())
|
||||||
assert len(theFiles) in (1, 2) # Sometimes 2 due to clock tick
|
assert len(theFiles) in (1, 2) # Sometimes 2 due to clock tick
|
||||||
|
|
||||||
theZip = theFiles[-1].name
|
theZip = theFiles[-1]
|
||||||
assert theZip[:12] == "Backup from "
|
assert theZip.name.startswith("Test Minimal")
|
||||||
assert theZip[-4:] == ".zip"
|
assert theZip.suffix == ".zip"
|
||||||
|
|
||||||
# Extract the archive
|
# 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")
|
inZip.extractall(tstPaths.tmpDir / "extract")
|
||||||
|
|
||||||
# Check that the main project file was restored
|
# Check that the main project file was restored
|
||||||
|
|||||||
Reference in New Issue
Block a user