Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
PluginRegistry.utils.TestFileFinder Class Reference

List of all members.

Public Member Functions

def __init__
def visit

Public Attributes

 files

Detailed Description

Definition at line 57 of file utils.py.


Constructor & Destructor Documentation

Definition at line 59 of file utils.py.

00059 
00060     def __init__( self ):
00061         self.files = []


Member Function Documentation

def PluginRegistry.utils.TestFileFinder.visit (   self,
  prefix,
  dir,
  files 
)
    Visitor for os.path.walk:  accumulates filenamse of unittests.

Definition at line 62 of file utils.py.

00062 
00063     def visit( self, prefix, dir, files ):
00064         """
00065             Visitor for os.path.walk:  accumulates filenamse of unittests.
00066         """
00067         #if dir[-5:] != "tests":
00068         #    return
00069 
00070         # ignore tests that aren't in packages
00071         if not "__init__.py" in files:
00072 
00073             if not files or files == ['CVS']:
00074                 return
00075 
00076             if 0 and __debug__: # XXX: don't care!
00077                 print "not a package", dir
00078 
00079             return
00080 
00081         for file in files:
00082 
00083             if file.startswith( prefix ) and file.endswith( ".py" ):
00084                 path = os.path.join(dir, file)
00085                 self.files.append(path)


Member Data Documentation

Definition at line 60 of file utils.py.


The documentation for this class was generated from the following file: