Sha256: b14aba29a2220b8ac238c5aed2bbdcda783fdc309578cb53c2004d137f9aa1c1

Contents?: true

Size: 987 Bytes

Versions: 107

Compression:

Stored size: 987 Bytes

Contents

import unittest

from rna_transcription import to_rna


class DNATests(unittest.TestCase):

    def test_transcribes_guanine_to_cytosine(self):
        self.assertEqual('C', to_rna('G'))

    def test_transcribes_cytosine_to_guanine(self):
        self.assertEqual('G', to_rna('C'))

    def test_transcribes_thymine_to_adenine(self):
        self.assertEqual('A', to_rna('T'))

    def test_transcribes_adenine_to_uracil(self):
        self.assertEqual('U', to_rna('A'))

    def test_transcribes_all_occurences(self):
        self.assertMultiLineEqual('UGCACCAGAAUU', to_rna('ACGTGGTCTTAA'))

    def test_correctly_handles_single_invalid_input(self):
        self.assertEqual('', to_rna('U'))

    def test_correctly_handles_completely_invalid_input(self):
        self.assertMultiLineEqual('', to_rna('XXX'))

    def test_correctly_handles_partially_invalid_input(self):
        self.assertMultiLineEqual('', to_rna('ACGTXXXCTTAA'))


if __name__ == '__main__':
    unittest.main()

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
trackler-2.0.8.26 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.24 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.23 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.22 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.21 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.20 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.19 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.18 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.17 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.16 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.15 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.14 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.13 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.12 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.11 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.10 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.9 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.8 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.7 tracks/python/exercises/rna-transcription/rna_transcription_test.py
trackler-2.0.8.6 tracks/python/exercises/rna-transcription/rna_transcription_test.py