Back to index

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

List of all members.

Public Member Functions

def test_generate
def init
def cleanup
def touch
def tmpfile

Public Attributes

 tmpdir

Detailed Description

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


Member Function Documentation

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.TestCaseWithTmpDir.init (   self) [inherited]

Reimplemented in unit-expandlibs.TestExpandInit.

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

00123 
00124     def init(self):
00125         self.tmpdir = os.path.abspath(mkdtemp(dir=os.curdir))

def unit-expandlibs.TestExpandLibsGen.test_generate (   self)
Test library descriptor generation

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

00137 
00138     def test_generate(self):
00139         '''Test library descriptor generation'''
00140         files = [self.tmpfile(f) for f in
00141                  [Lib('a'), Obj('b'), Lib('c'), Obj('d'), Obj('e'), Lib('f')]]
00142         self.touch(files[:-1])
00143         self.touch([files[-1] + config.LIBS_DESC_SUFFIX])
00144 
00145         desc = generate(files)
00146         self.assertEqual(desc['OBJS'], [self.tmpfile(Obj(s)) for s in ['b', 'd', 'e']])
00147         self.assertEqual(desc['LIBS'], [self.tmpfile(Lib(s)) for s in ['a', 'c', 'f']])

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.TestCaseWithTmpDir.tmpdir [inherited]

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


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