<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import StringIO <EOL> import ngsutils . fastq . trim <EOL> from ngsutils . fastq import FASTQ <EOL> class TrimTest ( unittest . TestCase ) : <EOL> def testTrim5 ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_5 = '<STR_LIT>' , min_len = <NUM_LIT:10> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrim3 ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_3 = '<STR_LIT>' , min_len = <NUM_LIT:10> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrim53 ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_5 = '<STR_LIT>' , linker_3 = '<STR_LIT>' , min_len = <NUM_LIT:10> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrimMinLen ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_5 = '<STR_LIT>' , min_len = <NUM_LIT:20> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrimMinOffset ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_5 = '<STR_LIT>' , min_len = <NUM_LIT:20> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrimPctIdentity ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_5 = '<STR_LIT>' , min_len = <NUM_LIT:10> , pct_identity = <NUM_LIT:1.0> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrimPctIdentity0_8 ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_5 = '<STR_LIT>' , min_len = <NUM_LIT:10> , pct_identity = <NUM_LIT> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testTrimCS ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . trim . fastq_trim ( FASTQ ( fileobj = fq ) , linker_3 = '<STR_LIT>' , min_len = <NUM_LIT:10> , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
