<commit_before>import unittest
from mock import Mock, patch, PropertyMock
from src.transcript_fixer import fix_transcript 

class TestTranscriptFixer(unittest.TestCase):

    def test_fix_transcript(self):
        transcript = Mock()
        gene0 = Mock()
        gene1 = Mock()

        mrna0 = Mock()
        mrna1 = Mock()

        cds0 = Mock()
        cds0.length = Mock(return_value=5)
        cds1 = Mock()
        cds1.length = Mock(return_value=6)

        transcript.genes = [gene0, gene1]
        gene0.mrna = [mrna0]
        gene1.mrna = [mrna1]
        mrna0.cds = [cds0]
        mrna1.cds = [cds1]

        fix_transcript(transcript)

        self.assertEquals(transcript.genes, [gene1])


###################
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestTranscriptFixer))
    return suite
<commit_msg>added test fixture to transcript fixer tests<commit_after>import unittest
from mock import Mock, patch, PropertyMock
from src.transcript_fixer import fix_transcript 

class TestTranscriptFixer(unittest.TestCase):

    def setUp(self):
        self.transcript = Mock()
        self.gene0 = Mock()
        self.gene1 = Mock()

        self.mrna0 = Mock()
        self.mrna1 = Mock()

        self.cds0 = Mock()
        self.cds0.length = Mock(return_value=5)
        self.cds1 = Mock()
        self.cds1.length = Mock(return_value=6)

        self.transcript.genes = [self.gene0, self.gene1]
        self.gene0.mrna = [self.mrna0]
        self.gene1.mrna = [self.mrna1]
        self.mrna0.cds = [self.cds0]
        self.mrna1.cds = [self.cds1]

    def test_fix_transcript(self):
        fix_transcript(self.transcript)
        self.assertEquals(self.transcript.genes, [self.gene1])

    def test_fix_phase(self):
        transcript = Mock()



###################
def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestTranscriptFixer))
    return suite

{'fraction_non_alphanumeric': 0.12551440329218108, 'fraction_numerical': 0.021604938271604937, 'mean_word_length': 2.656015037593985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2622425', 'n_tokens_mistral': 677, 'n_tokens_neox': 624, 'n_words': 122}