def test_m( self ): expression = Bio.Martel.Expression.AtEnd() print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "ab\n", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_s(self): expression = Bio.Martel.Expression.Literal("Z") print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("Ye", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_s( self ): expression = Bio.Martel.Expression.Literal( "Z" ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "Ye", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_q(self): expression = Bio.Martel.Str("abcd") print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("Abcd", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_c(self): expression = Bio.Martel.Any("ace") print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("e", tagtable)[0] return (self.assert_condition(success == 1, "Failed"))
def test_m(self): expression = Bio.Martel.Expression.AtEnd() print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("ab\n", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_q( self ): expression = Bio.Martel.Str( "abcd" ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "Abcd", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_c( self ): expression = Bio.Martel.Any( "ace" ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "e", tagtable )[ 0 ] return ( self.assert_condition( success == 1, "Failed" ) )
def test_z2( self ): exp = Bio.Martel.Expression.Literal( '9' ) expression = Bio.Martel.Seq( exp ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "9", tagtable )[ 0 ] return ( self.assert_condition( success == 1, "Failed" ) )
def test_y2( self ): alt = Bio.Martel.Str( 'uvwx' ) expression = Bio.Martel.Alt( alt ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "Uvwx", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_y2(self): alt = Bio.Martel.Str('uvwx') expression = Bio.Martel.Alt(alt) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("Uvwx", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_z2(self): exp = Bio.Martel.Expression.Literal('9') expression = Bio.Martel.Seq(exp) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("9", tagtable)[0] return (self.assert_condition(success == 1, "Failed"))
def test_w2(self): exp1 = Bio.Martel.Any('GHIjk') exp2 = Bio.Martel.Str('[]{}~') expression = exp1 | exp2 print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("[]{}", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_k2(self): exp1 = Bio.Martel.Any('GHIjk') exp2 = Bio.Martel.Str(':) :)') expression = exp1 + exp2 print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("G:) :)", tagtable)[0] return (self.assert_condition(success == 1, "Failed"))
def test_k2( self ): exp1 = Bio.Martel.Any( 'GHIjk' ) exp2 = Bio.Martel.Str( ':) :)' ) expression = exp1 + exp2 print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "G:) :)", tagtable )[ 0 ] return ( self.assert_condition( success == 1, "Failed" ) )
def test_w2( self ): exp1 = Bio.Martel.Any( 'GHIjk' ) exp2 = Bio.Martel.Str( '[]{}~' ) expression = exp1 | exp2 print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "[]{}", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_a1( self ): alt1 = Bio.Martel.Expression.Literal( 'K' ) alt2 = Bio.Martel.Str( 'VWX' ) alt3 = Bio.Martel.Any( 'lmn' ) expression = Bio.Martel.Alt( alt1, alt2, alt3 ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "UVWX", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_t2(self): exp1 = Bio.Martel.Expression.Literal('P') exp2 = Bio.Martel.Any('gHiJk') exp3 = Bio.Martel.Str('.<>,;') expression = exp1 | exp2 | exp3 print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("j", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_p2(self): exp1 = Bio.Martel.Str('$%@#/\\') exp2 = Bio.Martel.Any('GHIjk') exp3 = Bio.Martel.Str('(*+_-=') expression = exp1 + exp2 + exp3 print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("$%@#/\\I*+-_=", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_j2(self): exp1 = Bio.Martel.Expression.Literal('P') exp2 = Bio.Martel.Any('ghijk') exp3 = Bio.Martel.Str('!!!!!') expression = exp1 + exp2 + exp3 print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("Pk!!!!!", tagtable)[0] return (self.assert_condition(success == 1, "Failed"))
def test_j2( self ): exp1 = Bio.Martel.Expression.Literal( 'P' ) exp2 = Bio.Martel.Any( 'ghijk' ) exp3 = Bio.Martel.Str( '!!!!!' ) expression = exp1 + exp2 + exp3 print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "Pk!!!!!", tagtable )[ 0 ] return ( self.assert_condition( success == 1, "Failed" ) )
def test_p2( self ): exp1 = Bio.Martel.Str( '$%@#/\\' ) exp2 = Bio.Martel.Any( 'GHIjk' ) exp3 = Bio.Martel.Str( '(*+_-=' ) expression = exp1 + exp2 + exp3 print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "$%@#/\\I*+-_=", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_g1(self): exp1 = Bio.Martel.Expression.Literal('K') exp2 = Bio.Martel.Str('VWX') exp3 = Bio.Martel.Any('lmn') expression = Bio.Martel.Seq(exp1, exp2, exp3) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("KmVWX", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_t2( self ): exp1 = Bio.Martel.Expression.Literal( 'P' ) exp2 = Bio.Martel.Any( 'gHiJk' ) exp3 = Bio.Martel.Str( '.<>,;' ) expression = exp1 | exp2 | exp3 print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "j", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_g1( self ): exp1 = Bio.Martel.Expression.Literal( 'K' ) exp2 = Bio.Martel.Str( 'VWX' ) exp3 = Bio.Martel.Any( 'lmn' ) expression = Bio.Martel.Seq( exp1, exp2, exp3 ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "KmVWX", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_a1(self): alt1 = Bio.Martel.Expression.Literal('K') alt2 = Bio.Martel.Str('VWX') alt3 = Bio.Martel.Any('lmn') expression = Bio.Martel.Alt(alt1, alt2, alt3) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("UVWX", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_z1( self ): exp1 = Bio.Martel.Str( 'Az' ) exp2 = Bio.Martel.Expression.Literal( 'K' ) exp3 = Bio.Martel.MaxRepeat( exp1, 0, 0 ) expression = Bio.Martel.Seq( exp3, exp2 ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "AzK", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_z1(self): exp1 = Bio.Martel.Str('Az') exp2 = Bio.Martel.Expression.Literal('K') exp3 = Bio.Martel.MaxRepeat(exp1, 0, 0) expression = Bio.Martel.Seq(exp3, exp2) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("AzK", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_f2(self): exp1 = Bio.Martel.Expression.Literal('t') exp2 = Bio.Martel.Str('ij') exp3 = Bio.Martel.Seq(exp1, exp2) exp4 = Bio.Martel.Expression.Assert(exp3, 3) exp5 = Bio.Martel.Str('ti') expression = Bio.Martel.Seq(exp4, exp5) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("tij", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_f2( self ): exp1 = Bio.Martel.Expression.Literal( 't' ) exp2 = Bio.Martel.Str( 'ij' ) exp3 = Bio.Martel.Seq( exp1, exp2 ) exp4 = Bio.Martel.Expression.Assert( exp3, 3 ) exp5 = Bio.Martel.Str( 'ti' ) expression = Bio.Martel.Seq( exp4, exp5 ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "tij", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_h2(self): exp1 = Bio.Martel.Expression.Literal('t') exp2 = Bio.Martel.Str('pQrsT') exp3 = Bio.Martel.Seq(exp1, exp2) exp4 = Bio.Martel.Group('item', exp3) exp5 = Bio.Martel.Str('ab') expression = Bio.Martel.Seq( exp4, exp5, \ Bio.Martel.Expression.GroupRef( 'item' ) ) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("tpQrsTabtPqRSt", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))
def test_h2( self ): exp1 = Bio.Martel.Expression.Literal( 't' ) exp2 = Bio.Martel.Str( 'pQrsT' ) exp3 = Bio.Martel.Seq( exp1, exp2 ) exp4 = Bio.Martel.Group( 'item', exp3 ) exp5 = Bio.Martel.Str( 'ab' ) expression = Bio.Martel.Seq( exp4, exp5, \ Bio.Martel.Expression.GroupRef( 'item' ) ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "tpQrsTabtPqRSt", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_i2( self ): exp1 = Bio.Martel.Expression.Literal( 't' ) exp2 = Bio.Martel.Expression.Literal( 'T' ) exp3 = Bio.Martel.Alt( exp1, exp2 ) exp4 = Bio.Martel.Str( '01234' ) exp5 = Bio.Martel.Seq( exp3, exp4 ) exp6 = Bio.Martel.Group( 'item', exp5 ) exp7 = Bio.Martel.Str( '56789' ) exp8 = Bio.Martel.Expression.GroupRef( 'item' ) expression = Bio.Martel.Seq( exp6, exp7, exp8, exp7, exp8, exp7 ) print expression tagtable, want_flg = Bio.Martel.Generate.generate( expression ) success = tag( "t0123456789T0123456789t0123456789", tagtable )[ 0 ] return ( self.assert_condition( success == 0, "Failed" ) )
def test_i2(self): exp1 = Bio.Martel.Expression.Literal('t') exp2 = Bio.Martel.Expression.Literal('T') exp3 = Bio.Martel.Alt(exp1, exp2) exp4 = Bio.Martel.Str('01234') exp5 = Bio.Martel.Seq(exp3, exp4) exp6 = Bio.Martel.Group('item', exp5) exp7 = Bio.Martel.Str('56789') exp8 = Bio.Martel.Expression.GroupRef('item') expression = Bio.Martel.Seq(exp6, exp7, exp8, exp7, exp8, exp7) print expression tagtable, want_flg = Bio.Martel.Generate.generate(expression) success = tag("t0123456789T0123456789t0123456789", tagtable)[0] return (self.assert_condition(success == 0, "Failed"))