old_contents: #! /usr/bin/env python
  # -*- coding: UTF-8 -*-
  #################################################################
  #
  # ProActive Parallel Suite(TM): The Java(TM) library for
  #    Parallel, Distributed, Multi-Core Computing for
  #     Enterprise Grids & Clouds
  #
  # Copyright (C) 1997-2010 ActiveEon 
  # Contact: proactive@ow2.org or contact@activeeon.com
  #
  # This library is free software; you can redistribute it and/or
  # modify it under the terms of the GNU General Public License
  # as published by the Free Software Foundation; version 3 of
  # the License.
  #
  # This library is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  # General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this library; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  # USA
  #
  # If needed, contact us to obtain a release under GPL Version 2 
  # or a different license than the GPL.
  #
  #  Initial developer(s):               The ActiveEon Team
  #  Contributor(s):
  #
  #################################################################
  # $$ACTIVEEON_INITIAL_DEV$$
  #################################################################
  
  import unittest
  import sys
  
  from palinagent.daemon.tests import xmlrunner
  
  import palinagent.daemon.tests.testXMLConfig
  import palinagent.daemon.tests.testEventGenerator
  import palinagent.daemon.tests.testUtils
  import palinagent.daemon.tests.testErrors
  
  
  loader = unittest.TestLoader()
  suite = unittest.TestSuite([
      loader.loadTestsFromModule(palinagent.daemon.tests.testXMLConfig),
      loader.loadTestsFromModule(palinagent.daemon.tests.testEventGenerator),
      loader.loadTestsFromModule(palinagent.daemon.tests.testUtils),
      loader.loadTestsFromModule(palinagent.daemon.tests.testErrors),
  ])
  
  def get_testsuite():
      return suite
  
  
  if __name__ == "__main__":
      import optparse
      
      parser = optparse.OptionParser()
      parser.add_option("-o", "--output",  action="store", dest="output", default="text", help="Format of the output", )
      (options, args) = parser.parse_args();
      
      runner = None
      if options.output == "text":
          runner = unittest.TextTestRunner(verbosity=2)
      elif options.output == "xml":
          runner = xmlrunner.XMLTestRunner()
      else:
          print >> sys.stderr, "Unsupported output format"
  
      runner.run(suite)
new_contents: #! /usr/bin/env python
  # -*- coding: UTF-8 -*-
  #################################################################
  #
  # ProActive Parallel Suite(TM): The Java(TM) library for
  #    Parallel, Distributed, Multi-Core Computing for
  #     Enterprise Grids & Clouds
  #
  # Copyright (C) 1997-2010 ActiveEon 
  # Contact: proactive@ow2.org or contact@activeeon.com
  #
  # This library is free software; you can redistribute it and/or
  # modify it under the terms of the GNU General Public License
  # as published by the Free Software Foundation; version 3 of
  # the License.
  #
  # This library is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  # General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this library; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  # USA
  #
  # If needed, contact us to obtain a release under GPL Version 2 
  # or a different license than the GPL.
  #
  #  Initial developer(s):               The ActiveEon Team
  #  Contributor(s):
  #
  #################################################################
  # $$ACTIVEEON_INITIAL_DEV$$
  #################################################################
  
  import unittest
  import sys
  
  from palinagent.daemon.tests import xmlrunner
  
  import palinagent.daemon.tests.testXMLConfig
  import palinagent.daemon.tests.testEventGenerator
  import palinagent.daemon.tests.testUtils
  import palinagent.daemon.tests.testErrors
  
  
  loader = unittest.TestLoader()
  suite = unittest.TestSuite([
      loader.loadTestsFromModule(palinagent.daemon.tests.testXMLConfig),
      loader.loadTestsFromModule(palinagent.daemon.tests.testEventGenerator),
      loader.loadTestsFromModule(palinagent.daemon.tests.testUtils),
      loader.loadTestsFromModule(palinagent.daemon.tests.testErrors),
  ])
  
  def get_testsuite():
      return suite
  
  
  if __name__ == "__main__":
      import optparse
      
      parser = optparse.OptionParser()
      parser.add_option("-o", "--output",  action="store", dest="output", default="text", help="Format of the output", )
      parser.add_option("-c", "--coverage",action="store_true", dest="coverage", default="False", help="Enable code coverage", )
     
      (options, args) = parser.parse_args();
      
      runner = None
      if options.output == "text":
          runner = unittest.TextTestRunner(verbosity=2)
      elif options.output == "xml":
          runner = xmlrunner.XMLTestRunner()
      else:
          print >> sys.stderr, "Unsupported output format"
      
      cov = None
      if options.coverage is True:
          import coverage
          cov = coverage.coverage()
          cov.start()
          
      runner.run(suite)
  
      if cov is not None:
          cov.stop()
          cov.html_report(directory='covhtml')
      
      
subject: Add code coverage support in the test suite