<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import StringIO <EOL> import ngsutils . fastq . tag <EOL> from ngsutils . fastq import FASTQ <EOL> class TagTest ( unittest . TestCase ) : <EOL> def testPrefix ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . tag . fastq_tag ( FASTQ ( fileobj = fq ) , prefix = '<STR_LIT>' , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testSuffix ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . tag . fastq_tag ( FASTQ ( fileobj = fq ) , suffix = '<STR_LIT>' , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testPrefixSuffix ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . fastq . tag . fastq_tag ( FASTQ ( fileobj = fq ) , prefix = '<STR_LIT>' , suffix = '<STR_LIT>' , quiet = True , out = out ) <EOL> self . assertEqual ( out . getvalue ( ) , '''<STR_LIT>''' ) <EOL> def testAssert ( self ) : <EOL> fq = StringIO . StringIO ( '''<STR_LIT>''' ) <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> fastq = FASTQ ( fileobj = fq ) <EOL> self . assertRaises ( ValueError , ngsutils . fastq . tag . fastq_tag , * [ fastq ] , ** { '<STR_LIT>' : True , '<STR_LIT>' : out } ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
