Add test coverage of session log class

This commit is contained in:
Veronica Berglyd Olsen
2023-06-15 00:19:47 +02:00
parent 2a1324e6cc
commit ca2964c037
2 changed files with 115 additions and 1 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ class NWSessionLog:
def iterRecords(self) -> Iterator[dict]:
"""Iterate through all records in the log."""
sessFile = self._project.storage.getMetaFile(nwFiles.SESS_FILE)
if isinstance(sessFile, Path):
if isinstance(sessFile, Path) and sessFile.is_file():
try:
with open(sessFile, mode="r", encoding="utf-8") as fObj:
for line in fObj: