<s> '''<STR_LIT>''' <EOL> import unittest <EOL> from ngsutils . bam . t import MockRead <EOL> import ngsutils . bam . tofastq <EOL> import StringIO <EOL> read = MockRead ( '<STR_LIT:foo>' , '<STR_LIT>' , '<STR_LIT>' , tags = [ ( '<STR_LIT>' , '<STR_LIT>' ) , ( '<STR_LIT>' , '<STR_LIT>' ) ] ) <EOL> class FASTXTest ( unittest . TestCase ) : <EOL> def testFASTQ ( self ) : <EOL> sio = StringIO . StringIO ( "<STR_LIT>" ) <EOL> ngsutils . bam . tofastq . write_fastq ( read , sio ) <EOL> self . assertEqual ( sio . getvalue ( ) , '<STR_LIT>' ) <EOL> sio . close ( ) <EOL> def testFASTA ( self ) : <EOL> sio = StringIO . StringIO ( "<STR_LIT>" ) <EOL> ngsutils . bam . tofastq . write_fasta ( read , sio ) <EOL> self . assertEqual ( sio . getvalue ( ) , '<STR_LIT>' ) <EOL> sio . close ( ) <EOL> def testFASTQ_cs ( self ) : <EOL> sio = StringIO . StringIO ( "<STR_LIT>" ) <EOL> ngsutils . bam . tofastq . write_fastq ( read , sio , colorspace = True ) <EOL> self . assertEqual ( sio . getvalue ( ) , '<STR_LIT>' ) <EOL> sio . close ( ) <EOL> def testFASTA_cs ( self ) : <EOL> sio = StringIO . StringIO ( "<STR_LIT>" ) <EOL> ngsutils . bam . tofastq . write_fasta ( read , sio , colorspace = True ) <EOL> self . assertEqual ( sio . getvalue ( ) , '<STR_LIT>' ) <EOL> sio . close ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
