Exemple #1
0
 def test_ResultedTimingsToXMLWriter(self):
     """
     Testing the correctness of the ResultedTimingsToXMLWriter class.
     The following test cases are covered:
     1. Calling a ResultedTimingsToXMLWriter with a wrong parameter
        1.a None
        1.b an integer value
     2. Calling the ResultedTimingsToXMLWriter with a correct parameter
     """
     wrtr = ResultedTimingsToXMLWriter()
     #1.a
     strRepresentation = wrtr.createXMLFromResultedTimings(None)
     self.assertEqual(strRepresentation, None)
     #1.b
     strRepresentation = wrtr.createXMLFromResultedTimings(1)
     self.assertEqual(strRepresentation, None)
     #2
     rsltTimings = ResultedTimings(None, self.testTask, self.testTimeStamp)
     strRepresentation = wrtr.createXMLFromResultedTimings(
         rsltTimings).toxml()
     expectedOutput = "<?xml version=\"1.0\" ?><proceedings><timestamp>201405161350</timestamp><task>PrettyTestTask</task><waiting><entry><probleminstance>PI1</probleminstance><computeralgebrasystem>cas1</computeralgebrasystem></entry><entry><probleminstance>PI1</probleminstance><computeralgebrasystem>cas2</computeralgebrasystem></entry><entry><probleminstance>PI1</probleminstance><computeralgebrasystem>cas3</computeralgebrasystem></entry><entry><probleminstance>PI1</probleminstance><computeralgebrasystem>cas4</computeralgebrasystem></entry><entry><probleminstance>PI2</probleminstance><computeralgebrasystem>cas1</computeralgebrasystem></entry><entry><probleminstance>PI2</probleminstance><computeralgebrasystem>cas2</computeralgebrasystem></entry><entry><probleminstance>PI2</probleminstance><computeralgebrasystem>cas3</computeralgebrasystem></entry><entry><probleminstance>PI2</probleminstance><computeralgebrasystem>cas4</computeralgebrasystem></entry><entry><probleminstance>PI3</probleminstance><computeralgebrasystem>cas1</computeralgebrasystem></entry><entry><probleminstance>PI3</probleminstance><computeralgebrasystem>cas2</computeralgebrasystem></entry><entry><probleminstance>PI3</probleminstance><computeralgebrasystem>cas3</computeralgebrasystem></entry><entry><probleminstance>PI3</probleminstance><computeralgebrasystem>cas4</computeralgebrasystem></entry><entry><probleminstance>PI4</probleminstance><computeralgebrasystem>cas1</computeralgebrasystem></entry><entry><probleminstance>PI4</probleminstance><computeralgebrasystem>cas2</computeralgebrasystem></entry><entry><probleminstance>PI4</probleminstance><computeralgebrasystem>cas3</computeralgebrasystem></entry><entry><probleminstance>PI4</probleminstance><computeralgebrasystem>cas4</computeralgebrasystem></entry></waiting><running/><completed/><error/></proceedings>"
     self.assertEqual(strRepresentation, expectedOutput)
Exemple #2
0
    def build(self, xmlRaw, task):
        """
        Returns an instance of ResultedTimings, given an xml-string and an instance of the associated task.
        The given string is assumed to have the following form::
          <?xml version="1.0" ?>
          <proceedings>
            <timestamp>
              "The timestamp"
            </timestamp>
            <task>
              "the name of the executed task"
            </task>
            <running>
              <entry>
                <probleminstance>
                  "A problem instance"
                </probleminstance>
                <computeralgebrasystem>
                  "A computer algebra system"
                </computeralgebrasystem>
              </entry>
            </running>
            <waiting>
              "same as running"
            </waiting>
            <completed>
              "same as running, but with"
               <timings>
                  <real>
                    "real time"
                  </real>
                  <user>
                    "user time"
                  </user>
                  <sys>
                    "sys time"
                  <sys>
                </timings>
            </completed>
            <error>
              "same as completed"
            </error>
          </proceedings>

        An IOError is raised if the XML instance was not valid.
        
        :param    xmlRaw: The xml-representation of the proceedings.
        :type     xmlRaw: string
        :param    task: The task associated to the given proceedings instance.
        :type     task: Task
        :returns: An instance of the ResultedTimings class
        :rtype:   ResultedTimings
        """
        try:
            xmlTree = dom.parseString(xmlRaw)
        except:
            raise IOError("Could not parse the given string as XML-Instance")
        try:
            timeStamp = str((xmlTree.getElementsByTagName("timestamp")[0]
                             ).firstChild.data).strip()
        except:
            raise IOError("Given XML instance did not have a timestamp entry")
        result = ResultedTimings(None, task, timeStamp)
        try:
            completedCalculations = xmlTree.getElementsByTagName(
                "completed")[0]
            erroneousCalculations = xmlTree.getElementsByTagName("error")[0]
        except:
            raise IOError(
                "Could not find entries for completed resp. erroneous computations"
            )
        #First dealing with all the completed calculations
        tempEntry = completedCalculations.firstChild
        while (tempEntry != None and tempEntry.nodeType == dom.Node.TEXT_NODE):
            tempEntry = tempEntry.nextSibling
        while tempEntry != None:
            try:
                cas = str(
                    (tempEntry.getElementsByTagName("computeralgebrasystem")[0]
                     ).firstChild.data).strip()
                pi = str((tempEntry.getElementsByTagName("probleminstance")[0]
                          ).firstChild.data).strip()
                runTimes = tempEntry.getElementsByTagName("timings")[0]
                runTimeReal = str((runTimes.getElementsByTagName("real")[0]
                                   ).firstChild.data).strip()
                runTimeUser = str((runTimes.getElementsByTagName("user")[0]
                                   ).firstChild.data).strip()
                runTimeSys = str((runTimes.getElementsByTagName("sys")[0]
                                  ).firstChild.data).strip()
                runTimesCollected = {
                    "real": runTimeReal,
                    "user": runTimeUser,
                    "sys": runTimeSys
                }
            except:
                raise IOError(
                    "The entries in the list of completed calculations are not valid"
                )
            result.setRUNNING([pi, cas])
            result.setCOMPLETED([pi, cas], runTimesCollected)
            tempEntry = tempEntry.nextSibling
            while (tempEntry != None
                   and tempEntry.nodeType == dom.Node.TEXT_NODE):
                tempEntry = tempEntry.nextSibling
        #Now dealing with the erroneous calculations
        tempEntry = erroneousCalculations.firstChild
        while (tempEntry != None and tempEntry.nodeType == dom.Node.TEXT_NODE):
            tempEntry = tempEntry.nextSibling
        while tempEntry != None:
            try:
                cas = str(
                    (tempEntry.getElementsByTagName("computeralgebrasystem")[0]
                     ).firstChild.data).strip()
                pi = str((tempEntry.getElementsByTagName("probleminstance")[0]
                          ).firstChild.data).strip()
                runTimes = tempEntry.getElementsByTagName("timings")[0]
                runTimeReal = str((runTimes.getElementsByTagName("real")[0]
                                   ).firstChild.data).strip()
                runTimeUser = str((runTimes.getElementsByTagName("user")[0]
                                   ).firstChild.data).strip()
                runTimeSys = str((runTimes.getElementsByTagName("sys")[0]
                                  ).firstChild.data).strip()
                runTimesCollected = {
                    "real": runTimeReal,
                    "user": runTimeUser,
                    "sys": runTimeSys
                }
            except:
                raise IOError(
                    "The entries in the list of erroneous computations were not valid."
                )
            result.setRUNNING([pi, cas])
            result.setERROR([pi, cas], runTimesCollected)
            tempEntry = tempEntry.nextSibling
            while (tempEntry != None
                   and tempEntry.nodeType == dom.Node.TEXT_NODE):
                tempEntry = tempEntry.nextSibling
        return result
Exemple #3
0
 def test_ResultedTimings(self):
     """
     This tests checks the correctness of the ResultedTimings class. The following tests are covered:
     1. Creation of ResultedTimings with None in every input part (fail)
     2. Creation of ResultedTimings with wrong Datatypes (fail)
        2.a) Proceedings integer value
        2.b) Task and/or timestamp integers
     3. Correct initialization of the ResultedTimings
        3.1. Test the initial set
        3.2. Test the getters
        3.3. Test setRunning with incorrect value
        3.4. Test setRunning with correct value
        3.5. Test setCompleted with incorrect value
        3.6. Test setCompleted with correct value
        3.7. Test setERROR with incorrect value
        3.8. Test setERROR with correct value.
     """
     testPassed = 1
     #1.
     try:
         rst = ResultedTimings(None,None,None)
         testPassed = 0
     except:
         pass
     if (testPassed == 0):
         self.fail("Could create instance of ResultedTimings with None in all entries")
     #2.a
     try:
         rst = ResultedTimings(1)
         testPassed = 0
     except:
         pass
     if (testPassed == 0):
         self.fail("Could create instance of ResultedTimings with Integer as associated Proceedings")
     #2.b
     try:
         rst = ResultedTimings(None, 1,1)
         testPassed = 0
     except:
         pass
     if (testPassed == 0):
         self.fail("Could create ResultedTimings with wrong datatypes for task and timestamp")
     #3
     rst = ResultedTimings(None,self.testTask,self.testTimeStamp)
     #3.1
     self.assertEqual(len(rst.getWAITING()),16,"Number of waiting processes was not correct")
     self.assertEqual(rst.getRUNNING(),[],"Running processes initially wrong")
     self.assertEqual(rst.getCOMPLETED(),[],"Completed processes initially wrong")
     self.assertEqual(rst.getERROR(),[], "Erroneous processes initially wrong")
     #3.2
     self.assertEqual(rst.getTask(), self.testTask.getName(), "Initialization with wrong task performed")
     self.assertEqual(rst.getTimeStamp(), self.testTimeStamp, "Initialization with wrong timeStamp")
     self.assertEqual(rst.getResultingFileDict(),{}, "Initialization with wrong resultingFileDict")
     rst.setRUNNING("abc")
     self.assertEqual(len(rst.getWAITING()),16,"invalid setRunning changed WAITING list.")
     self.assertEqual(rst.getRUNNING(),[],"invalid setRunning changed RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(),[],"invalid setRunning changed COMPLETED list.")
     self.assertEqual(rst.getERROR(),[], "invalid setRunning changed ERROR list.")
     #5.4
     rst.setRUNNING(["PI1","cas1"])
     self.assertEqual(len(rst.getWAITING()),15,"setRunning changed WAITING list wrongly.")
     self.assertEqual(rst.getRUNNING(),[["PI1","cas1", None]],"setRunning did not affect RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(),[],"setRunning changed COMPLETED list.")
     self.assertEqual(rst.getERROR(),[], "setRunning changed ERROR list.")
     #5.5
     timingTemp = {"real":1.2, "user":1.3, "sys": 1.4}
     rst.setCOMPLETED("abc",timingTemp)
     self.assertEqual(len(rst.getWAITING()),15,"invalid setCompleted changed WAITING list wrongly.")
     self.assertEqual(rst.getRUNNING(),[["PI1","cas1",None]],"invalid setCompleted changed RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(),[],"invalid setCompleted changed COMPLETED list.")
     self.assertEqual(rst.getERROR(),[], "invalid setCompleted changed ERROR list.")
     #5.6
     rst.setCOMPLETED(["PI1","cas1"],timingTemp)
     self.assertEqual(len(rst.getWAITING()),15,"setCompleted changed WAITING list.")
     self.assertEqual(rst.getRUNNING(),[],"setCompleted changed RUNNING list wrongly.")
     self.assertEqual(rst.getCOMPLETED(),[["PI1","cas1",timingTemp]],"setCompleted did not change COMPLETED list.")
     self.assertEqual(rst.getERROR(),[], "setCompleted changed ERROR list.")
     #5.7
     rst.setERROR(["PI1","cas1"], timingTemp)
     self.assertEqual(len(rst.getWAITING()),15,"invalid setERROR changed WAITING list.")
     self.assertEqual(rst.getRUNNING(),[],"invalid setERROR changed RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(),[["PI1","cas1",timingTemp]],"invalid setERROR changed COMPLETED list.")
     self.assertEqual(rst.getERROR(),[], "invalid serERROR changed ERROR list.")
     #5.8
     rst.setRUNNING(["PI2","cas1", None])
     rst.setERROR(["PI2", "cas1"],timingTemp)
     self.assertEqual(len(rst.getWAITING()),14,"setERROR changed WAITING list.")
     self.assertEqual(rst.getRUNNING(),[],"setERROR changed RUNNING list wrongly.")
     self.assertEqual(rst.getCOMPLETED(),[["PI1","cas1",timingTemp]],"setERROR changed COMPLETED list.")
     self.assertEqual(rst.getERROR(),[["PI2", "cas1",timingTemp]], "setERROR changed ERROR list wrongly.")
Exemple #4
0
    def test_ResultedTimingsToHTMLWriter(self):
        """
        Testing the correctness of the ResultedTimingsToHTMLWriter class.
        The following test cases are covered:
        1. Calling a ResultedTimingsToHTMLWriter with a wrong parameter
           1.a None
           1.b an integer value
        2. Calling the ResultedTimingsToHTMLWriter with a correct parameter
        """
        wrtr = ResultedTimingsToHTMLWriter()
        #1.a
        strRepresentation = wrtr.createHTMLFromResultedTimings(None)
        self.assertEqual(strRepresentation, None)
        #1.b
        strRepresentation = wrtr.createHTMLFromResultedTimings(1)
        self.assertEqual(strRepresentation, None)
        #2
        rsltTimings = ResultedTimings(None, self.testTask, self.testTimeStamp)
        expectedOutput = "<html>\n\
<head>\n\
\t<title>PrettyTestTask run at 201405161350</title>\n\
\t<link rel=\"stylesheet\" type=\"text/css\" href=\"proceedings_css.css\">\n\
</head>\n\
<body>\n\
<h1> Task: PrettyTestTask </h1>\n\
<h2> Run at time: 201405161350 </h2>\n\
<br><br>\n\
<table id=\"mainTable\">\n\
\t<tr>\n\
\t\t<td id=\"piAndCAS\"> Problem Instance/Computer Algebra System</td>\n\
\t\t<td id=\"casName\">cas4</td>\n\
\t\t<td id=\"casName\">cas1</td>\n\
\t\t<td id=\"casName\">cas3</td>\n\
\t\t<td id=\"casName\">cas2</td>\n\
\t</tr>\n\
\t<tr>\n\
\t\t<td id=\"piName\">PI1</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t</tr>\n\
\t<tr>\n\
\t\t<td id=\"piName\">PI2</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t</tr>\n\
\t<tr>\n\
\t\t<td id=\"piName\">PI3</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t</tr>\n\
\t<tr>\n\
\t\t<td id=\"piName\">PI4</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t\t<td id=\"waitingCalc\">WAITING</td>\n\
\t</tr>\n\
</table>\n\
</body>\n\
</html>"

        self.assertEqual(expectedOutput,
                         wrtr.createHTMLFromResultedTimings(rsltTimings),
                         "HTML output of ResultedTimings was not correct.")
Exemple #5
0
 def test_ResultedTimings(self):
     """
     This tests checks the correctness of the ResultedTimings class. The following tests are covered:
     1. Creation of ResultedTimings with None in every input part (fail)
     2. Creation of ResultedTimings with wrong Datatypes (fail)
        2.a) Proceedings integer value
        2.b) Task and/or timestamp integers
     3. Correct initialization of the ResultedTimings
        3.1. Test the initial set
        3.2. Test the getters
        3.3. Test setRunning with incorrect value
        3.4. Test setRunning with correct value
        3.5. Test setCompleted with incorrect value
        3.6. Test setCompleted with correct value
        3.7. Test setERROR with incorrect value
        3.8. Test setERROR with correct value.
     """
     testPassed = 1
     #1.
     try:
         rst = ResultedTimings(None, None, None)
         testPassed = 0
     except:
         pass
     if (testPassed == 0):
         self.fail(
             "Could create instance of ResultedTimings with None in all entries"
         )
     #2.a
     try:
         rst = ResultedTimings(1)
         testPassed = 0
     except:
         pass
     if (testPassed == 0):
         self.fail(
             "Could create instance of ResultedTimings with Integer as associated Proceedings"
         )
     #2.b
     try:
         rst = ResultedTimings(None, 1, 1)
         testPassed = 0
     except:
         pass
     if (testPassed == 0):
         self.fail(
             "Could create ResultedTimings with wrong datatypes for task and timestamp"
         )
     #3
     rst = ResultedTimings(None, self.testTask, self.testTimeStamp)
     #3.1
     self.assertEqual(len(rst.getWAITING()), 16,
                      "Number of waiting processes was not correct")
     self.assertEqual(rst.getRUNNING(), [],
                      "Running processes initially wrong")
     self.assertEqual(rst.getCOMPLETED(), [],
                      "Completed processes initially wrong")
     self.assertEqual(rst.getERROR(), [],
                      "Erroneous processes initially wrong")
     #3.2
     self.assertEqual(rst.getTask(), self.testTask.getName(),
                      "Initialization with wrong task performed")
     self.assertEqual(rst.getTimeStamp(), self.testTimeStamp,
                      "Initialization with wrong timeStamp")
     self.assertEqual(rst.getResultingFileDict(), {},
                      "Initialization with wrong resultingFileDict")
     rst.setRUNNING("abc")
     self.assertEqual(len(rst.getWAITING()), 16,
                      "invalid setRunning changed WAITING list.")
     self.assertEqual(rst.getRUNNING(), [],
                      "invalid setRunning changed RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(), [],
                      "invalid setRunning changed COMPLETED list.")
     self.assertEqual(rst.getERROR(), [],
                      "invalid setRunning changed ERROR list.")
     #5.4
     rst.setRUNNING(["PI1", "cas1"])
     self.assertEqual(len(rst.getWAITING()), 15,
                      "setRunning changed WAITING list wrongly.")
     self.assertEqual(rst.getRUNNING(), [["PI1", "cas1", None]],
                      "setRunning did not affect RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(), [],
                      "setRunning changed COMPLETED list.")
     self.assertEqual(rst.getERROR(), [], "setRunning changed ERROR list.")
     #5.5
     timingTemp = {"real": 1.2, "user": 1.3, "sys": 1.4}
     rst.setCOMPLETED("abc", timingTemp)
     self.assertEqual(len(rst.getWAITING()), 15,
                      "invalid setCompleted changed WAITING list wrongly.")
     self.assertEqual(rst.getRUNNING(), [["PI1", "cas1", None]],
                      "invalid setCompleted changed RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(), [],
                      "invalid setCompleted changed COMPLETED list.")
     self.assertEqual(rst.getERROR(), [],
                      "invalid setCompleted changed ERROR list.")
     #5.6
     rst.setCOMPLETED(["PI1", "cas1"], timingTemp)
     self.assertEqual(len(rst.getWAITING()), 15,
                      "setCompleted changed WAITING list.")
     self.assertEqual(rst.getRUNNING(), [],
                      "setCompleted changed RUNNING list wrongly.")
     self.assertEqual(rst.getCOMPLETED(), [["PI1", "cas1", timingTemp]],
                      "setCompleted did not change COMPLETED list.")
     self.assertEqual(rst.getERROR(), [],
                      "setCompleted changed ERROR list.")
     #5.7
     rst.setERROR(["PI1", "cas1"], timingTemp)
     self.assertEqual(len(rst.getWAITING()), 15,
                      "invalid setERROR changed WAITING list.")
     self.assertEqual(rst.getRUNNING(), [],
                      "invalid setERROR changed RUNNING list.")
     self.assertEqual(rst.getCOMPLETED(), [["PI1", "cas1", timingTemp]],
                      "invalid setERROR changed COMPLETED list.")
     self.assertEqual(rst.getERROR(), [],
                      "invalid serERROR changed ERROR list.")
     #5.8
     rst.setRUNNING(["PI2", "cas1", None])
     rst.setERROR(["PI2", "cas1"], timingTemp)
     self.assertEqual(len(rst.getWAITING()), 14,
                      "setERROR changed WAITING list.")
     self.assertEqual(rst.getRUNNING(), [],
                      "setERROR changed RUNNING list wrongly.")
     self.assertEqual(rst.getCOMPLETED(), [["PI1", "cas1", timingTemp]],
                      "setERROR changed COMPLETED list.")
     self.assertEqual(rst.getERROR(), [["PI2", "cas1", timingTemp]],
                      "setERROR changed ERROR list wrongly.")
    def build(self, xmlRaw, task):
        """
        Returns an instance of ResultedTimings, given an xml-string and an instance of the associated task.
        The given string is assumed to have the following form::
          <?xml version="1.0" ?>
          <proceedings>
            <timestamp>
              "The timestamp"
            </timestamp>
            <task>
              "the name of the executed task"
            </task>
            <running>
              <entry>
                <probleminstance>
                  "A problem instance"
                </probleminstance>
                <computeralgebrasystem>
                  "A computer algebra system"
                </computeralgebrasystem>
              </entry>
            </running>
            <waiting>
              "same as running"
            </waiting>
            <completed>
              "same as running, but with"
               <timings>
                  <real>
                    "real time"
                  </real>
                  <user>
                    "user time"
                  </user>
                  <sys>
                    "sys time"
                  <sys>
                </timings>
            </completed>
            <error>
              "same as completed"
            </error>
          </proceedings>

        An IOError is raised if the XML instance was not valid.
        
        :param    xmlRaw: The xml-representation of the proceedings.
        :type     xmlRaw: string
        :param    task: The task associated to the given proceedings instance.
        :type     task: Task
        :returns: An instance of the ResultedTimings class
        :rtype:   ResultedTimings
        """
        try:
            xmlTree = dom.parseString(xmlRaw)
        except:
            raise IOError("Could not parse the given string as XML-Instance")
        try:
            timeStamp = str((xmlTree.getElementsByTagName("timestamp")[0]).firstChild.data).strip()
        except:
            raise IOError("Given XML instance did not have a timestamp entry")
        result = ResultedTimings(None, task,timeStamp)
        try:
            completedCalculations = xmlTree.getElementsByTagName("completed")[0]
            erroneousCalculations   = xmlTree.getElementsByTagName("error")[0]
        except:
            raise IOError("Could not find entries for completed resp. erroneous computations")
        #First dealing with all the completed calculations
        tempEntry = completedCalculations.firstChild
        while (tempEntry != None and tempEntry.nodeType == dom.Node.TEXT_NODE):
            tempEntry = tempEntry.nextSibling
        while tempEntry != None:
            try:
                cas = str((tempEntry.getElementsByTagName("computeralgebrasystem")[0]).firstChild.data).strip()
                pi  = str((tempEntry.getElementsByTagName("probleminstance")[0]).firstChild.data).strip()
                runTimes = tempEntry.getElementsByTagName("timings")[0]
                runTimeReal = str((runTimes.getElementsByTagName("real")[0]).firstChild.data).strip()
                runTimeUser = str((runTimes.getElementsByTagName("user")[0]).firstChild.data).strip()
                runTimeSys = str((runTimes.getElementsByTagName("sys")[0]).firstChild.data).strip()
                runTimesCollected = {"real":runTimeReal,"user":runTimeUser, "sys":runTimeSys}
            except:
                raise IOError("The entries in the list of completed calculations are not valid")
            result.setRUNNING([pi,cas])
            result.setCOMPLETED([pi,cas],runTimesCollected)
            tempEntry = tempEntry.nextSibling
            while (tempEntry != None and tempEntry.nodeType == dom.Node.TEXT_NODE):
                tempEntry = tempEntry.nextSibling
        #Now dealing with the erroneous calculations
        tempEntry = erroneousCalculations.firstChild
        while (tempEntry != None and tempEntry.nodeType == dom.Node.TEXT_NODE):
            tempEntry = tempEntry.nextSibling
        while tempEntry != None:
            try:
                cas = str((tempEntry.getElementsByTagName("computeralgebrasystem")[0]).firstChild.data).strip()
                pi  = str((tempEntry.getElementsByTagName("probleminstance")[0]).firstChild.data).strip()
                runTimes = tempEntry.getElementsByTagName("timings")[0]
                runTimeReal = str((runTimes.getElementsByTagName("real")[0]).firstChild.data).strip()
                runTimeUser = str((runTimes.getElementsByTagName("user")[0]).firstChild.data).strip()
                runTimeSys = str((runTimes.getElementsByTagName("sys")[0]).firstChild.data).strip()
                runTimesCollected = {"real":runTimeReal,"user":runTimeUser, "sys":runTimeSys}
            except:
                raise IOError("The entries in the list of erroneous computations were not valid.")
            result.setRUNNING([pi,cas])
            result.setERROR([pi,cas],runTimesCollected)
            tempEntry = tempEntry.nextSibling
            while (tempEntry != None and tempEntry.nodeType == dom.Node.TEXT_NODE):
                tempEntry = tempEntry.nextSibling
        return result