if(line.startsWith("suite")){
if(line.startsWith("PythonTests")){ DateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd  'at' HH:mm:ss z"); long elapsed = endTimeMillis - startTimeMillis; int hours = (int)elapsed/3600000; int minutes = (int)(elapsed - hours*3600000)/60000; int seconds = (int)(elapsed - hours*3600000 - minutes*60000)/1000; String elapsedTimeString = null; if(hours == 0 && minutes == 0){ elapsedTimeString = seconds + " seconds"; }else if(hours == 0){ elapsedTimeString = minutes + " minutes " + seconds + " seconds"; }else{ elapsedTimeString = hours + " hours " + minutes + " minutes " + seconds + " seconds"; }  line = "<PythonTests start=\"" + simpleDateFormat.format(new Date(startTimeMillis)) + "\" elapsed=\"" + elapsedTimeString + "\">"; }  if(line.startsWith("suite")){
    public void endTests(Properties configuration) throws Throwable {	    String resultString = "</PythonTests>";	    myResults.addFirst(resultString);	    String line = null;	    	    while(true){		    if(!myResults.isEmpty()){		        line = (String)myResults.removeLast();		    }else{		        break;		    }	        if(line.startsWith("suite")){	            String suiteName = line.substring("suite".length());	            SuiteStatistics stat = (SuiteStatistics)mySuitesStat.remove(suiteName);	            int failed = stat.suitesCount - stat.suitesPassed;	            line = "    <suite name=\"" + suiteName + "\" total=\"" + stat.suitesCount + "\" passed=\"" + stat.suitesPassed + "\" failed=\"" + failed + "\">";	        }	        myWriter.println(line);		    myWriter.flush();	    }	    	    TransformerFactory tFactory = TransformerFactory.newInstance();		try{		    Transformer transformer = tFactory.newTransformer(new StreamSource(myXSLStylesheet));			transformer.transform(new StreamSource(myXMLResultsFile), new StreamResult(new FileOutputStream(myHTMLResultsFile)));		}catch(TransformerConfigurationException tce){		    throw new Throwable("Can't create a transformer: "+tce.getMessage());		}catch(TransformerException te){	        throw new Throwable("Can't transform: "+te.getMessage());		}catch(FileNotFoundException fnfe){	        throw new Throwable("Can't find input xml file: "+fnfe.getMessage());		}	        }