<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import StringIO <EOL> import ngsutils . gtf . tobed <EOL> from ngsutils . gtf import GTF <EOL> gtf = GTF ( fileobj = StringIO . StringIO ( '''<STR_LIT>''' . replace ( '<STR_LIT:|>' , '<STR_LIT:\t>' ) ) , quiet = True ) <EOL> class GTFTest ( unittest . TestCase ) : <EOL> def testGeneToBed ( self ) : <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . gtf . tobed . gtf_genes_tobed ( gtf , out = out ) <EOL> self . assertEquals ( out . getvalue ( ) . replace ( '<STR_LIT:\t>' , '<STR_LIT:|>' ) , '<STR_LIT>' ) <EOL> def testExonToBed ( self ) : <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . gtf . tobed . gtf_exons_tobed ( gtf , out = out ) <EOL> self . assertEquals ( out . getvalue ( ) . replace ( '<STR_LIT:\t>' , '<STR_LIT:|>' ) , '''<STR_LIT>''' ) <EOL> def testRegionToBed ( self ) : <EOL> out = StringIO . StringIO ( '<STR_LIT>' ) <EOL> ngsutils . gtf . tobed . gtf_regions_tobed ( gtf , out = out ) <EOL> self . assertEquals ( out . getvalue ( ) . replace ( '<STR_LIT:\t>' , '<STR_LIT:|>' ) , '''<STR_LIT>''' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
