Fix testCoreProject_Methods test on Windows

This commit is contained in:
Veronica K. B. Olsen
2020-12-05 21:24:19 +01:00
parent 51cb9814d2
commit bd9ed0d5d3
2 changed files with 3 additions and 5 deletions
-3
View File
@@ -6,15 +6,12 @@ import sys
import pytest
import shutil
import os
import time
from dummy import DummyMain
from PyQt5.QtWidgets import QMessageBox
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
os.environ["TZ"] = "UTC"
time.tzset()
from nw.config import Config # noqa: E402
+3 -2
View File
@@ -14,6 +14,7 @@ from dummy import causeOSError
from nw.core.project import NWProject
from nw.constants import nwItemClass, nwItemType, nwItemLayout, nwFiles
from nw.common import formatTimeStamp
@pytest.mark.core
def testCoreProject_NewMinimal(fncDir, outDir, refDir, tmpDir, dummyGUI):
@@ -842,8 +843,8 @@ def testCoreProject_Methods(monkeypatch, nwMinimal, dummyGUI, tmpDir):
assert readFile(statsFile) == (
"# Offset 100\n"
"# Start Time End Time Novel Notes\n"
"2020-09-13 13:00:00 2020-09-13 14:00:00 200 100\n"
)
"%s %s 200 100\n"
) % (formatTimeStamp(1600002000), formatTimeStamp(1600005600))
# Pack XML Value
xElem = etree.Element("element")