This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: fix import problem(unittest.py)
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: purcell Nosy List: purcell, quiver
Priority: normal Keywords: patch

Created on 2003-10-07 07:23 by quiver, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unittest.py.diff quiver, 2003-10-07 07:23
Messages (2)
msg44745 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2003-10-07 07:23
This patch includes 3 changes to unittest.py.

* Don't import unittest.(important)
  unittest is imported in the original script.
  This can be the cause of trouble.

* cast float (trivial)
  TextTestRunner.run() method has the line as 
follows:
  timeTaken = float(stopTime - startTime)

  However, time.time() returns the time by a 
floating point number by default.
  So you don't need to cast the value to a float.

* fix typo (trivial)
  """Note that decimal places (from zero) is 
usually ..."""

  'is' should be 'are'.
msg44746 - (view) Author: Steve Purcell (purcell) (Python triager) Date: 2003-10-26 10:41
Logged In: YES 
user_id=21477

Thanks George! 
 
At some point in the distant past I believe it was necessary to import 
'unittest', otherwise the 'TestCase' that a module saw was not the same 
as the 'TestCase' seen within 'unittest', and the user's TestCase 
subclasses were not recognised as subclasses of the TestCase seen 
within unittest. I see no evidence that this is the case now, so I'm 
incorporating this and your other 2 changes. 
History
Date User Action Args
2022-04-10 16:11:39adminsetgithub: 39380
2003-10-07 07:23:47quivercreate