[Patches] [ python-Patches-440292 ] Test cases for pyclbr.py

noreply@sourceforge.net noreply@sourceforge.net
Sat, 21 Jul 2001 20:10:48 -0700


Patches item #440292, was opened at 2001-07-10 22:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=440292&group_id=5470

Category: library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nick Mathewson (nickm)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Test cases for pyclbr.py

Initial Comment:
These test cases exercise the pyclbr module.   They
work by comparing the output of pyclbr to the results
of module introspection for some of the largest modules
in the Python distribution.

They also skirt several limitations of pyclbr not
mentioned in the BUGS section of pyclbr.py.  For
example, pyclbr.py does really
bad in the presence of the string [ '"""'  ].   (This
keeps it from handling pydoc.py.)

While writing these test cases, I also found a minor
bug in pyclbr.py that would prevent it from finding
functions (but not classes) declared in other modules. 
I'm also including a patch for this bug.

----------------------------------------------------------------------

>Comment By: Nick Mathewson (nickm)
Date: 2001-07-21 20:10

Message:
Logged In: YES 
user_id=499

Well, there were two problems:

1) The test case didn't test the problem I thought it did.

2) The patch didn't fix the problem I thought I was testing! :)

I'm uploading new versions of each.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-21 13:38

Message:
Logged In: YES 
user_id=3066

The test case doesn't cover the bug fixed in the patch; it should fail if I try it without applying the patch.

----------------------------------------------------------------------

Comment By: Nick Mathewson (nickm)
Date: 2001-07-19 17:25

Message:
Logged In: YES 
user_id=499

Updated to use unittest, and to be generally a bit more legible.

----------------------------------------------------------------------

Comment By: Nick Mathewson (nickm)
Date: 2001-07-10 22:22

Message:
Logged In: YES 
user_id=499

(More information on the bug: whereas pyclbr.py can notice
imports
of the format: "from module import class", it wasn't able to
handle "from module import fn".  Now it can.)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=440292&group_id=5470