Fix merge conflicts
This commit is contained in:
+18
-2
@@ -22,13 +22,14 @@ theProject = NWProject(theMain)
|
||||
theProject.handleSeed = 42
|
||||
|
||||
@pytest.mark.project
|
||||
def testProjectNew(nwTempProj,nwRef):
|
||||
def testProjectNew(nwTempProj,nwRef,nwTemp):
|
||||
projFile = path.join(nwTempProj,"nwProject.nwx")
|
||||
refFile = path.join(nwRef,"proj","1_nwProject.nwx")
|
||||
assert theConf.initConfig(nwRef)
|
||||
assert theConf.initConfig(nwRef, nwTemp)
|
||||
assert theProject.newProject()
|
||||
assert theProject.setProjectPath(nwTempProj)
|
||||
assert theProject.saveProject()
|
||||
assert theProject.closeProject()
|
||||
assert cmpFiles(projFile, refFile, [2])
|
||||
|
||||
@pytest.mark.project
|
||||
@@ -41,9 +42,21 @@ def testProjectSave(nwTempProj,nwRef):
|
||||
projFile = path.join(nwTempProj,"nwProject.nwx")
|
||||
refFile = path.join(nwRef,"proj","1_nwProject.nwx")
|
||||
assert theProject.saveProject()
|
||||
assert theProject.closeProject()
|
||||
assert cmpFiles(projFile, refFile, [2])
|
||||
assert not theProject.projChanged
|
||||
|
||||
@pytest.mark.project
|
||||
def testProjectOpenTwice(nwTempProj,nwRef):
|
||||
projFile = path.join(nwTempProj,"nwProject.nwx")
|
||||
refFile = path.join(nwRef,"proj","1_nwProject.nwx")
|
||||
assert theProject.openProject(projFile)
|
||||
assert not theProject.openProject(projFile)
|
||||
assert theProject.openProject(projFile, overrideLock=True)
|
||||
assert theProject.saveProject()
|
||||
assert theProject.closeProject()
|
||||
assert cmpFiles(projFile, refFile, [2])
|
||||
|
||||
@pytest.mark.project
|
||||
def testProjectNewRoot(nwTempProj,nwRef):
|
||||
projFile = path.join(nwTempProj,"nwProject.nwx")
|
||||
@@ -59,6 +72,7 @@ def testProjectNewRoot(nwTempProj,nwRef):
|
||||
assert isinstance(theProject.newRoot("Custom2", nwItemClass.CUSTOM), str)
|
||||
assert theProject.projChanged
|
||||
assert theProject.saveProject()
|
||||
assert theProject.closeProject()
|
||||
assert cmpFiles(projFile, refFile, [2])
|
||||
assert not theProject.projChanged
|
||||
|
||||
@@ -95,3 +109,5 @@ def testIndexScanThis(nwTempProj):
|
||||
assert isValid
|
||||
assert str(theBits) == "['@tag', 'this', 'and this']"
|
||||
assert str(thePos) == "[0, 6, 12]"
|
||||
|
||||
assert theProject.closeProject()
|
||||
|
||||
Reference in New Issue
Block a user