Fix tests

This commit is contained in:
Veronica K. B. Olsen
2020-06-05 21:09:04 +02:00
parent 50630df705
commit a05f77e6c0
9 changed files with 44 additions and 23 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="2" autoCount="0" timeStamp="2020-05-29 23:05:28"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 21:05:07">
<project> <project>
<name>New Project</name> <name>New Project</name>
<title></title> <title></title>
<backup>True</backup> <saveCount>2</saveCount>
<autoCount>1</autoCount>
<editTime>0</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>False</spellCheck> <spellCheck>False</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>None</lastEdited> <lastEdited>None</lastEdited>
+5 -2
View File
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="4" autoCount="1" timeStamp="2020-05-30 15:31:30" editTime="12"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 21:06:00">
<project> <project>
<name>New Project</name> <name>New Project</name>
<title></title> <title></title>
<backup>True</backup> <saveCount>5</saveCount>
<autoCount>1</autoCount>
<editTime>11</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>True</spellCheck> <spellCheck>True</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>31489056e0916</lastEdited> <lastEdited>31489056e0916</lastEdited>
+5 -2
View File
@@ -1,13 +1,16 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="2" autoCount="0" timeStamp="2020-05-29 23:07:05"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 21:07:03">
<project> <project>
<name>Project Name</name> <name>Project Name</name>
<title>Project Title</title> <title>Project Title</title>
<author>Jane Doe</author> <author>Jane Doe</author>
<author>John Doh</author> <author>John Doh</author>
<backup>True</backup> <saveCount>2</saveCount>
<autoCount>1</autoCount>
<editTime>1</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>False</spellCheck> <spellCheck>False</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>None</lastEdited> <lastEdited>None</lastEdited>
+5 -2
View File
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="2" autoCount="0" timeStamp="2020-05-29 23:07:37"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 21:07:51">
<project> <project>
<name>New Project</name> <name>New Project</name>
<title></title> <title></title>
<backup>True</backup> <saveCount>2</saveCount>
<autoCount>1</autoCount>
<editTime>0</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>False</spellCheck> <spellCheck>False</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>None</lastEdited> <lastEdited>None</lastEdited>
+5 -2
View File
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="1" autoCount="0" timeStamp="2020-05-29 23:03:58"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 20:58:52">
<project> <project>
<name>New Project</name> <name>New Project</name>
<title></title> <title></title>
<backup>True</backup> <saveCount>1</saveCount>
<autoCount>0</autoCount>
<editTime>0</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>False</spellCheck> <spellCheck>False</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>None</lastEdited> <lastEdited>None</lastEdited>
+5 -2
View File
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="4" autoCount="0" timeStamp="2020-05-29 23:04:31"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 21:03:18">
<project> <project>
<name>New Project</name> <name>New Project</name>
<title></title> <title></title>
<backup>True</backup> <saveCount>4</saveCount>
<autoCount>0</autoCount>
<editTime>0</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>False</spellCheck> <spellCheck>False</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>None</lastEdited> <lastEdited>None</lastEdited>
+5 -2
View File
@@ -1,11 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.7.0rc1" hexVersion="0x000700c1" fileVersion="1.1" saveCount="5" autoCount="0" timeStamp="2020-05-29 23:04:50"> <novelWriterXML appVersion="0.8.0rc1" hexVersion="0x000800c1" fileVersion="1.1" timeStamp="2020-06-05 21:04:10">
<project> <project>
<name>New Project</name> <name>New Project</name>
<title></title> <title></title>
<backup>True</backup> <saveCount>5</saveCount>
<autoCount>0</autoCount>
<editTime>0</editTime>
</project> </project>
<settings> <settings>
<doBackup>True</doBackup>
<spellCheck>False</spellCheck> <spellCheck>False</spellCheck>
<autoOutline>True</autoOutline> <autoOutline>True</autoOutline>
<lastEdited>None</lastEdited> <lastEdited>None</lastEdited>
+4 -4
View File
@@ -45,7 +45,7 @@ def testMainWindows(qtbot, nwTempGUI, nwRef, nwTemp):
# Check the files # Check the files
projFile = path.join(nwTempGUI,"nwProject.nwx") projFile = path.join(nwTempGUI,"nwProject.nwx")
assert cmpFiles(projFile, path.join(nwRef,"gui","0_nwProject.nwx"), [2]) assert cmpFiles(projFile, path.join(nwRef,"gui","0_nwProject.nwx"), [2, 6, 7, 8])
qtbot.wait(stepDelay) qtbot.wait(stepDelay)
# qtbot.stopForInteraction() # qtbot.stopForInteraction()
@@ -246,7 +246,7 @@ def testMainWindows(qtbot, nwTempGUI, nwRef, nwTemp):
# Check the files # Check the files
refFile = path.join(nwTempGUI, "nwProject.nwx") refFile = path.join(nwTempGUI, "nwProject.nwx")
assert cmpFiles(refFile, path.join(nwRef, "gui", "1_nwProject.nwx"), [2]) assert cmpFiles(refFile, path.join(nwRef, "gui", "1_nwProject.nwx"), [2, 6, 7, 8])
refFile = path.join(nwTempGUI, "content", "0e17daca5f3e1.nwd") refFile = path.join(nwTempGUI, "content", "0e17daca5f3e1.nwd")
assert cmpFiles(refFile, path.join(nwRef, "gui", "1_0e17daca5f3e1.nwd")) assert cmpFiles(refFile, path.join(nwRef, "gui", "1_0e17daca5f3e1.nwd"))
refFile = path.join(nwTempGUI, "content", "98010bd9270f9.nwd") refFile = path.join(nwTempGUI, "content", "98010bd9270f9.nwd")
@@ -342,7 +342,7 @@ def testProjectEditor(qtbot, nwTempGUI, nwRef, nwTemp):
# Check the files # Check the files
projFile = path.join(nwTempGUI,"nwProject.nwx") projFile = path.join(nwTempGUI,"nwProject.nwx")
assert cmpFiles(projFile, path.join(nwRef, "gui", "2_nwProject.nwx"), [2]) assert cmpFiles(projFile, path.join(nwRef, "gui", "2_nwProject.nwx"), [2, 8, 9, 10])
nwGUI.closeMain() nwGUI.closeMain()
# qtbot.stopForInteraction() # qtbot.stopForInteraction()
@@ -391,7 +391,7 @@ def testItemEditor(qtbot, nwTempGUI, nwRef, nwTemp):
# Check the files # Check the files
projFile = path.join(nwTempGUI,"nwProject.nwx") projFile = path.join(nwTempGUI,"nwProject.nwx")
assert cmpFiles(projFile, path.join(nwRef, "gui", "3_nwProject.nwx"), [2]) assert cmpFiles(projFile, path.join(nwRef, "gui", "3_nwProject.nwx"), [2, 6, 7, 8])
nwGUI.closeMain() nwGUI.closeMain()
# qtbot.stopForInteraction() # qtbot.stopForInteraction()
+5 -5
View File
@@ -30,7 +30,7 @@ def testProjectNew(nwTempProj,nwRef,nwTemp):
assert theProject.setProjectPath(nwTempProj) assert theProject.setProjectPath(nwTempProj)
assert theProject.saveProject() assert theProject.saveProject()
assert theProject.closeProject() assert theProject.closeProject()
assert cmpFiles(projFile, refFile, [2]) assert cmpFiles(projFile, refFile, [2, 6, 7, 8])
@pytest.mark.project @pytest.mark.project
def testProjectOpen(nwTempProj): def testProjectOpen(nwTempProj):
@@ -43,7 +43,7 @@ def testProjectSave(nwTempProj,nwRef):
refFile = path.join(nwRef,"proj","1_nwProject.nwx") refFile = path.join(nwRef,"proj","1_nwProject.nwx")
assert theProject.saveProject() assert theProject.saveProject()
assert theProject.closeProject() assert theProject.closeProject()
assert cmpFiles(projFile, refFile, [2]) assert cmpFiles(projFile, refFile, [2, 6, 7, 8])
assert not theProject.projChanged assert not theProject.projChanged
@pytest.mark.project @pytest.mark.project
@@ -55,7 +55,7 @@ def testProjectOpenTwice(nwTempProj,nwRef):
assert theProject.openProject(projFile, overrideLock=True) assert theProject.openProject(projFile, overrideLock=True)
assert theProject.saveProject() assert theProject.saveProject()
assert theProject.closeProject() assert theProject.closeProject()
assert cmpFiles(projFile, refFile, [2]) assert cmpFiles(projFile, refFile, [2, 6, 7, 8])
@pytest.mark.project @pytest.mark.project
def testProjectNewRoot(nwTempProj,nwRef): def testProjectNewRoot(nwTempProj,nwRef):
@@ -73,7 +73,7 @@ def testProjectNewRoot(nwTempProj,nwRef):
assert theProject.projChanged assert theProject.projChanged
assert theProject.saveProject() assert theProject.saveProject()
assert theProject.closeProject() assert theProject.closeProject()
assert cmpFiles(projFile, refFile, [2]) assert cmpFiles(projFile, refFile, [2, 6, 7, 8])
assert not theProject.projChanged assert not theProject.projChanged
@pytest.mark.project @pytest.mark.project
@@ -86,7 +86,7 @@ def testProjectNewFile(nwTempProj,nwRef):
assert theProject.projChanged assert theProject.projChanged
assert theProject.saveProject() assert theProject.saveProject()
assert theProject.closeProject() assert theProject.closeProject()
assert cmpFiles(projFile, refFile, [2]) assert cmpFiles(projFile, refFile, [2, 6, 7, 8])
assert not theProject.projChanged assert not theProject.projChanged
@pytest.mark.project @pytest.mark.project