Пример #1
0
def setUpModule(self):
    global words, seed

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = genseed()
    random.seed(seed)
    testlib.random.seed(seed)
    log_mheader(log, testdir, testfile, seed)
    info = "Initialising wiki ..."
    log.info(info)
    print info
    alphanum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    words = ["".join([choice(alphanum) for i in range(randint(0, 20))]) for j in range(1000)]
Пример #2
0
def setUpModule( self ) :
    global words, seed

    testdir = os.path.basename( os.path.dirname( __file__ ))
    testfile= os.path.basename( __file__ )
    seed    = genseed()
    random.seed( seed )
    testlib.random.seed(  seed )
    log_mheader( log, testdir, testfile, seed )
    info    = "Initialising wiki ..."
    log.info( info )
    print info
    alphanum= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
    words   = [ ''.join([ choice( alphanum ) for i in range(randint(0, 20)) ])
                 for j in range( 1000 ) ]
Пример #3
0
def setUpModule() :
    global words, links, macros, htmls, seed

    testdir = os.path.basename( os.path.dirname( __file__ ))
    testfile= os.path.basename( __file__ )
    seed    = genseed()
    random.seed( seed )
    testlib.random.seed(  seed )
    log_mheader( log, testdir, testfile, seed )
    _loginfo( "Initialising wiki ..." )
    wordlist     = gen_wordlist( maxlen=20, count=200 )
    words        = gen_words( wordlist, count=200, huri_c=10, wuri_c=10 )
    _loginfo( "Initialising links ..." )
    linkwords    = gen_linkwords( maxlen=50, count=200 )
    links        = gen_links( linkwords, 100 )
    _loginfo( "Initialising macros ..." )
    macrowords   = gen_macrowords( maxlen=50, count=200 )
    macros       = gen_macros( macrowords, 100 )
    _loginfo( "Initialising htmls ..." )
    htmlwords    = gen_htmlwords( maxlen=50, count=200 )
    htmls        = gen_htmls( htmlwords, 100 )
Пример #4
0
def setUpModule():
    global words, links, macros, htmls, xwikinames, seed

    testdir = os.path.basename(os.path.dirname(__file__))
    testfile = os.path.basename(__file__)
    seed = genseed()
    random.seed(seed)
    testlib.random.seed(seed)
    log_mheader(log, testdir, testfile, seed)
    _loginfo("Initialising wiki ...")
    wordlist = gen_wordlist(maxlen=20, count=200)
    words = gen_words(wordlist, count=200, huri_c=10, wuri_c=10)
    _loginfo("Initialising links ...")
    linkwords = gen_linkwords(maxlen=50, count=200)
    links = gen_links(linkwords, 100)
    _loginfo("Initialising macros ...")
    macrowords = gen_macrowords(maxlen=50, count=200)
    macros = gen_macros(macrowords, 100)
    _loginfo("Initialising htmls ...")
    htmlwords = gen_htmlwords(maxlen=50, count=200)
    htmls = gen_htmls(htmlwords, 100)
    _loginfo("Initialising wiki extension names ...")
    xwikinames = gen_xwikinames(100)
Пример #5
0
def setUpModule():
    global words, links, macros, htmls, seed

    seed = genseed()
    random.seed(seed)
Пример #6
0
def setUpModule() :
    global words, links, macros, htmls, seed

    seed    = genseed()
    random.seed( seed )