Add test coverage of session log class

This commit is contained in:
Veronica Berglyd Olsen committed 2023-06-15 00:19:47 +02:00
1 parent 2a1324e6cc
commit ca2964c037
2 files changed
+115 -1

No files matched your search

+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: