tests/run-tests.py
changeset 24332 9612b96730d7
parent 24331 d3bdd8c7174f
child 24500 7b0a20cd8c95
equal deleted inserted replaced
24331:d3bdd8c7174f 24332:9612b96730d7
   459                                      os.path.basename(self.path))
   459                                      os.path.basename(self.path))
   460         os.mkdir(self._testtmp)
   460         os.mkdir(self._testtmp)
   461 
   461 
   462         # Remove any previous output files.
   462         # Remove any previous output files.
   463         if os.path.exists(self.errpath):
   463         if os.path.exists(self.errpath):
   464             os.remove(self.errpath)
   464             try:
       
   465                 os.remove(self.errpath)
       
   466             except OSError, e:
       
   467                 # We might have raced another test to clean up a .err
       
   468                 # file, so ignore ENOENT when removing a previous .err
       
   469                 # file.
       
   470                 if e.errno != errno.ENOENT:
       
   471                     raise
   465 
   472 
   466     def run(self, result):
   473     def run(self, result):
   467         """Run this test and report results against a TestResult instance."""
   474         """Run this test and report results against a TestResult instance."""
   468         # This function is extremely similar to unittest.TestCase.run(). Once
   475         # This function is extremely similar to unittest.TestCase.run(). Once
   469         # we require Python 2.7 (or at least its version of unittest), this
   476         # we require Python 2.7 (or at least its version of unittest), this