def test_B_bigtable(self): """Testing big tables""" print "\nTesting big tables" log.info("Testing big tables") def btablemultiline(firstline): rem = '\n'.join([ gen_texts(words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=1, nopipe=True) for i in range(0, 3) ]) return firstline + rem testlist = [ '\n'.join([ btablemultiline(gen_btableline(words, links, macros, htmls)) for j in range(randint(0, 10)) ]) + gen_psep(randint(0, 3)) for i in range(100) ] testcount = 1 for t in testlist: yield self._test_execute, 'bigtable', t, testcount
def test_C_table( self ) : """Testing tables""" print "\nTesting tables" log.info( "Testing tables" ) testlist = [ '\n'.join([ gen_row( words, links, macros, htmls ) for j in range(randint(0,10)) ]) + gen_psep(randint(0,3)) for i in range(100) ] testcount = 1 for t in testlist : yield self._test_execute, 'table', t, testcount testcount += 1
def test_7_wikix(self): """Testing wiki extension markup""" print "\nTesting wiki extension markup" log.info("Testing wiki extension markup") wikix_cont = '\n'.join([choice(words) for i in range(randint(1, 20))]) testlist = [ '{{{' + choice(xwikinames) + '\n' + wikix_cont + \ '\n}}}\n' + gen_psep(randint(0,3)) for i in range(1000) ] testcount = 1 for t in testlist: yield self._test_execute, 'wikix', t, testcount testcount += 1
def test_7_wikix( self ) : """Testing wiki extension markup""" print "\nTesting wiki extension markup" log.info( "Testing wiki extension markup" ) wikix_cont = '\n'.join([ choice(words) for i in range(randint(1,20)) ]) testlist = [ '{{{' + choice(xwikinames) + '\n' + wikix_cont + \ '\n}}}\n' + gen_psep(randint(0,3)) for i in range(1000) ] testcount = 1 for t in testlist : yield self._test_execute, 'wikix', t, testcount testcount += 1
def test_C_table(self): """Testing tables""" print "\nTesting tables" log.info("Testing tables") testlist = [ '\n'.join([ gen_row(words, links, macros, htmls) for j in range(randint(0, 10)) ]) + gen_psep(randint(0, 3)) for i in range(100) ] testcount = 1 for t in testlist: yield self._test_execute, 'table', t, testcount testcount += 1
def test_5_heading( self ) : """Testing heading markup""" print "\nTesting heading markup" log.info( "Testing heading markup" ) headmarkup= [ '=' , '==', '===', '====', '=====', 'h1.', 'h2.', 'h3.', 'h4.', 'h5.' ] testlist = [ choice(headmarkup) + gen_stylesh() + gen_headtext( words ) + choice( headmarkup + [ '' ] ) + gen_psep(3) for i in range(50) ] testcount = 1 for t in testlist : yield self._test_execute, 'heading', t, testcount testcount += 1
def test_G_definitions(self): """Testing definitions""" print "\nTesting definitions" log.info("Testing definitions") testlist = [ '\n'.join([ gen_defnmark() + \ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=1, nopipe=True ) for j in range(randint(0,10)) ]) + gen_psep(randint(0,3)) for i in range(100) ] testcount = 1 for t in testlist: yield self._test_execute, 'definitions', t, testcount testcount += 1
def test_5_heading(self): """Testing heading markup""" print "\nTesting heading markup" log.info("Testing heading markup") headmarkup = [ '=', '==', '===', '====', '=====', 'h1.', 'h2.', 'h3.', 'h4.', 'h5.' ] testlist = [ choice(headmarkup) + gen_stylesh() + gen_headtext(words) + choice(headmarkup + ['']) + gen_psep(3) for i in range(50) ] testcount = 1 for t in testlist: yield self._test_execute, 'heading', t, testcount testcount += 1
def test_G_definitions( self ) : """Testing definitions""" print "\nTesting definitions" log.info( "Testing definitions" ) testlist = [ '\n'.join([ gen_defnmark() + \ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=1, nopipe=True ) for j in range(randint(0,10)) ]) + gen_psep(randint(0,3)) for i in range(100) ] testcount = 1 for t in testlist : yield self._test_execute, 'definitions', t, testcount testcount += 1
def test_B_bigtable( self ) : """Testing big tables""" print "\nTesting big tables" log.info( "Testing big tables" ) def btablemultiline( firstline ) : rem = '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=1, nopipe=True ) for i in range(0,3) ]) return firstline + rem testlist = [ '\n'.join([ btablemultiline( gen_btableline( words, links, macros, htmls ) ) for j in range(randint(0,10)) ]) + gen_psep(randint(0,3)) for i in range(100) ] testcount = 1 for t in testlist : yield self._test_execute, 'bigtable', t, testcount
def test_A_textlines(self): """Testing textlines""" print "\nTesting textlines" log.info("Testing textlines") testlist = [ '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=1, nopipe=True ) for j in range(randint(0,10)) ]) + gen_psep(randint(0,3)) for i in range(100) ] +\ [ '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=0, nopipe=True ) for j in range(randint(0,10)) ]) + choice(ETMARKUP) + ' ' + '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=0, nopipe=True ) for j in range(randint(0,10)) ]) + choice(ETMARKUP) + ' ' '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=0, nopipe=True ) for j in range(randint(0,10)) ]) for i in range(10) ] testcount = 1 for t in testlist: yield self._test_execute, 'textlines', t, testcount testcount += 1
def test_A_textlines( self ) : """Testing textlines""" print "\nTesting textlines" log.info( "Testing textlines" ) testlist = [ '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=1, nopipe=True ) for j in range(randint(0,10)) ]) + gen_psep(randint(0,3)) for i in range(100) ] +\ [ '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=0, nopipe=True ) for j in range(randint(0,10)) ]) + choice(ETMARKUP) + ' ' + '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=0, nopipe=True ) for j in range(randint(0,10)) ]) + choice(ETMARKUP) + ' ' '\n'.join([ gen_texts( words, links, macros, htmls, tc=5, pc=1, ec=2, lc=1, mc=1, hc=1, fc=0, nopipe=True ) for j in range(randint(0,10)) ]) for i in range(10) ] testcount = 1 for t in testlist : yield self._test_execute, 'textlines', t, testcount testcount += 1