<s> '''<STR_LIT>''' <EOL> import os <EOL> import unittest <EOL> import ngsutils . bed . tofasta <EOL> import StringIO <EOL> from ngsutils . bed import BedFile <EOL> bedtest = BedFile ( fileobj = StringIO . StringIO ( '''<STR_LIT>''' . replace ( '<STR_LIT:|>' , '<STR_LIT:\t>' ) ) ) <EOL> fasta = os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> class FASTATest ( unittest . TestCase ) : <EOL> def testBedFASTA ( self ) : <EOL> valid = '''<STR_LIT>''' <EOL> sio = StringIO . StringIO ( "<STR_LIT>" ) <EOL> ngsutils . bed . tofasta . bed_tofasta ( bedtest , fasta , min_size = <NUM_LIT:10> , stranded = False , out = sio ) <EOL> self . assertEqual ( valid , sio . getvalue ( ) ) <EOL> sio . close ( ) <EOL> def testBedFASTAStranded ( self ) : <EOL> valid = '''<STR_LIT>''' <EOL> sio = StringIO . StringIO ( "<STR_LIT>" ) <EOL> ngsutils . bed . tofasta . bed_tofasta ( bedtest , fasta , min_size = <NUM_LIT:10> , stranded = True , out = sio ) <EOL> self . assertEqual ( valid , sio . getvalue ( ) ) <EOL> sio . close ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
