Esempio n. 1
0
 def test_writetasks(self):
     """Verifying writetasks"""
     tmpdir = tempfile.mkdtemp()
     testProject = _emulateProject(None, ("testTask1", "testTask2"))
     bomWriter = BOMWriter(None, "PythonUnitTesting", testProject, tmpdir)
     bomWriter.writetasks()
     myFile = open(tmpdir+"/PythonUnitTesting_tasks.txt",'r')
     contents = myFile.readlines()
     myFile.close()
     rmtree(tmpdir)
     assert len(contents) == 2
Esempio n. 2
0
 def test_writebaselines_withnodata(self):
     """Verifying writebaselines with no baseline"""
     tmpdir = tempfile.mkdtemp()
     testProject = _emulateProject(("testProject1", "testProject2"))
     testSession = _emulateSession(None)
     bomWriter = BOMWriter(testSession, "PythonUnitTesting", testProject, tmpdir)
     bomWriter.writebaselines()
     myFile = open(tmpdir+"/PythonUnitTesting_baselines.txt",'r')
     contents = myFile.readlines()
     myFile.close()
     rmtree(tmpdir)
     assert len(contents) == 4