Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
unit-expandlibs.TestExpandInit Class Reference
Inheritance diagram for unit-expandlibs.TestExpandInit:
Inheritance graph
[legend]
Collaboration diagram for unit-expandlibs.TestExpandInit:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def init
def assertRelEqual
def cleanup
def touch
def tmpfile

Public Attributes

 libx_files
 liby_files
 arg_files
 files
 tmpdir

Detailed Description

Definition at line 148 of file unit-expandlibs.py.


Member Function Documentation

def unit-expandlibs.TestExpandInit.assertRelEqual (   self,
  args1,
  args2 
)

Definition at line 172 of file unit-expandlibs.py.

00172 
00173     def assertRelEqual(self, args1, args2):
00174         self.assertEqual(args1, [relativize(a) for a in args2])

Here is the call graph for this function:

Here is the caller graph for this function:

def unit-expandlibs.TestCaseWithTmpDir.cleanup (   self) [inherited]

Definition at line 126 of file unit-expandlibs.py.

00126 
00127     def cleanup(self):
00128         rmtree(self.tmpdir)

def unit-expandlibs.TestExpandInit.init (   self)
Initializes test environment for library expansion tests

Reimplemented from unit-expandlibs.TestCaseWithTmpDir.

Definition at line 149 of file unit-expandlibs.py.

00149 
00150     def init(self):
00151         ''' Initializes test environment for library expansion tests'''
00152         super(TestExpandInit, self).init()
00153         # Create 2 fake libraries, each containing 3 objects, and the second
00154         # including the first one and another library.
00155         os.mkdir(self.tmpfile('libx'))
00156         os.mkdir(self.tmpfile('liby'))
00157         self.libx_files = [self.tmpfile('libx', Obj(f)) for f in ['g', 'h', 'i']]
00158         self.liby_files = [self.tmpfile('liby', Obj(f)) for f in ['j', 'k', 'l']] + [self.tmpfile('liby', Lib('z'))]
00159         self.touch(self.libx_files + self.liby_files)
00160         with open(self.tmpfile('libx', Lib('x') + config.LIBS_DESC_SUFFIX), 'w') as f:
00161             f.write(str(generate(self.libx_files)))
00162         with open(self.tmpfile('liby', Lib('y') + config.LIBS_DESC_SUFFIX), 'w') as f:
00163             f.write(str(generate(self.liby_files + [self.tmpfile('libx', Lib('x'))])))
00164 
00165         # Create various objects and libraries 
00166         self.arg_files = [self.tmpfile(f) for f in [Lib('a'), Obj('b'), Obj('c'), Lib('d'), Obj('e')]]
00167         # We always give library names (LIB_PREFIX/SUFFIX), even for
00168         # dynamic/import libraries
00169         self.files = self.arg_files + [self.tmpfile(ImportLib('f'))]
00170         self.arg_files += [self.tmpfile(Lib('f'))]
00171         self.touch(self.files)

Here is the call graph for this function:

def unit-expandlibs.TestCaseWithTmpDir.tmpfile (   self,
  args 
) [inherited]

Definition at line 133 of file unit-expandlibs.py.

00133 
00134     def tmpfile(self, *args):
00135         return os.path.join(self.tmpdir, *args)

Here is the caller graph for this function:

def unit-expandlibs.TestCaseWithTmpDir.touch (   self,
  files 
) [inherited]

Definition at line 129 of file unit-expandlibs.py.

00129 
00130     def touch(self, files):
00131         for f in files:
00132             open(f, 'w').close()

Here is the caller graph for this function:


Member Data Documentation

unit-expandlibs.TestExpandInit.arg_files

Definition at line 165 of file unit-expandlibs.py.

unit-expandlibs.TestExpandInit.files

Definition at line 168 of file unit-expandlibs.py.

unit-expandlibs.TestExpandInit.libx_files

Definition at line 156 of file unit-expandlibs.py.

unit-expandlibs.TestExpandInit.liby_files

Definition at line 157 of file unit-expandlibs.py.

unit-expandlibs.TestCaseWithTmpDir.tmpdir [inherited]

Definition at line 124 of file unit-expandlibs.py.


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