Back to index

moin  1.9.0~rc2
Functions | Variables
MoinMoin._tests.maketestwiki Namespace Reference

Functions

def removeTestWiki
def copyData
def untarUnderlay
def run

Variables

tuple filename = globals()
tuple moinpath = os.path.abspath(os.path.join(os.path.dirname(filename), os.pardir, os.pardir))
tuple WIKI = os.path.abspath(os.path.join(moinpath, 'tests', 'wiki'))
tuple SHARE = os.path.abspath(os.path.join(moinpath, 'wiki'))

Function Documentation

Definition at line 35 of file maketestwiki.py.

00035 
00036 def copyData():
00037     print 'copying data ...'
00038     src = os.path.join(SHARE, 'data')
00039     dst = os.path.join(WIKI, 'data')
00040     shutil.copytree(src, dst)
00041 

Here is the caller graph for this function:

Definition at line 24 of file maketestwiki.py.

00024 
00025 def removeTestWiki():
00026     print 'removing old wiki ...'
00027     for dir in ['data', 'underlay']:
00028         try:
00029             shutil.rmtree(os.path.join(WIKI, dir))
00030         except OSError, err:
00031             if not (err.errno == errno.ENOENT or
00032                     (err.errno == 3 and os.name == 'nt')):
00033                 raise
00034 

Here is the caller graph for this function:

def MoinMoin._tests.maketestwiki.run (   skip_if_existing = False)

Definition at line 50 of file maketestwiki.py.

00050 
00051 def run(skip_if_existing=False):
00052     try:
00053         os.makedirs(WIKI)
00054     except OSError, e:
00055         if e.errno != errno.EEXIST:
00056             raise
00057 
00058     if skip_if_existing and os.path.exists(os.path.join(WIKI, 'data')):
00059         return
00060     removeTestWiki()
00061     copyData()
00062     untarUnderlay()

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 42 of file maketestwiki.py.

00042 
00043 def untarUnderlay():
00044     print 'untaring underlay ...'
00045     tar = tarfile.open(os.path.join(SHARE, 'underlay.tar'))
00046     for member in tar:
00047         tar.extract(member, WIKI)
00048     tar.close()
00049 

Here is the caller graph for this function:


Variable Documentation

Definition at line 15 of file maketestwiki.py.

tuple MoinMoin._tests.maketestwiki.moinpath = os.path.abspath(os.path.join(os.path.dirname(filename), os.pardir, os.pardir))

Definition at line 16 of file maketestwiki.py.

tuple MoinMoin._tests.maketestwiki.SHARE = os.path.abspath(os.path.join(moinpath, 'wiki'))

Definition at line 21 of file maketestwiki.py.

tuple MoinMoin._tests.maketestwiki.WIKI = os.path.abspath(os.path.join(moinpath, 'tests', 'wiki'))

Definition at line 20 of file maketestwiki.py.