Index: unittest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/unittest.py,v retrieving revision 1.29 diff -c -r1.29 unittest.py *** unittest.py 30 Sep 2003 09:25:32 -0000 1.29 --- unittest.py 7 Oct 2003 06:54:23 -0000 *************** *** 329,335 **** difference rounded to the given number of decimal places (default 7) and comparing to zero. ! Note that decimal places (from zero) is usually not the same as significant digits (measured from the most signficant digit). """ if round(second-first, places) != 0: --- 329,335 ---- difference rounded to the given number of decimal places (default 7) and comparing to zero. ! Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit). """ if round(second-first, places) != 0: *************** *** 341,347 **** difference rounded to the given number of decimal places (default 7) and comparing to zero. ! Note that decimal places (from zero) is usually not the same as significant digits (measured from the most signficant digit). """ if round(second-first, places) == 0: --- 341,347 ---- difference rounded to the given number of decimal places (default 7) and comparing to zero. ! Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit). """ if round(second-first, places) == 0: *************** *** 509,527 **** for part in parts: parent, obj = obj, getattr(obj, part) - import unittest if type(obj) == types.ModuleType: return self.loadTestsFromModule(obj) elif (isinstance(obj, (type, types.ClassType)) and ! issubclass(obj, unittest.TestCase)): return self.loadTestsFromTestCase(obj) elif type(obj) == types.UnboundMethodType: return parent(obj.__name__) ! elif isinstance(obj, unittest.TestSuite): return obj elif callable(obj): test = obj() ! if not isinstance(test, (unittest.TestCase, unittest.TestSuite)): raise ValueError, \ "calling %s returned %s, not a test" % (obj,test) return test --- 509,526 ---- for part in parts: parent, obj = obj, getattr(obj, part) if type(obj) == types.ModuleType: return self.loadTestsFromModule(obj) elif (isinstance(obj, (type, types.ClassType)) and ! issubclass(obj, TestCase)): return self.loadTestsFromTestCase(obj) elif type(obj) == types.UnboundMethodType: return parent(obj.__name__) ! elif isinstance(obj, TestSuite): return obj elif callable(obj): test = obj() ! if not isinstance(test, (TestCase, TestSuite)): raise ValueError, \ "calling %s returned %s, not a test" % (obj,test) return test *************** *** 674,680 **** startTime = time.time() test(result) stopTime = time.time() ! timeTaken = float(stopTime - startTime) result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun --- 673,679 ---- startTime = time.time() test(result) stopTime = time.time() ! timeTaken = stopTime - startTime result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun