From e353142dcd644672a0d1b9d27479d1440085f754 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Mon, 8 Jul 2024 14:42:57 -0700 Subject: [PATCH] synced tests.toml and regenerated tests for Protein-Translation. --- exercises/practice/protein-translation/.meta/tests.toml | 4 ++++ .../protein-translation/protein_translation_test.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/exercises/practice/protein-translation/.meta/tests.toml b/exercises/practice/protein-translation/.meta/tests.toml index c083605251..f9f1381590 100644 --- a/exercises/practice/protein-translation/.meta/tests.toml +++ b/exercises/practice/protein-translation/.meta/tests.toml @@ -88,6 +88,9 @@ description = "Translation stops if STOP codon in middle of three-codon sequence [2c2a2a60-401f-4a80-b977-e0715b23b93d] description = "Translation stops if STOP codon in middle of six-codon sequence" +[f6f92714-769f-4187-9524-e353e8a41a80] +description = "Sequence of two non-STOP codons does not translate to a STOP codon" + [1e75ea2a-f907-4994-ae5c-118632a1cb0f] description = "Non-existing codon can't translate" include = false @@ -95,6 +98,7 @@ include = false [9eac93f3-627a-4c90-8653-6d0a0595bc6f] description = "Unknown amino acids, not part of a codon, can't translate" include = false +reimplements = "1e75ea2a-f907-4994-ae5c-118632a1cb0f" [9d73899f-e68e-4291-b1e2-7bf87c00f024] description = "Incomplete RNA sequence can't translate" diff --git a/exercises/practice/protein-translation/protein_translation_test.py b/exercises/practice/protein-translation/protein_translation_test.py index 91e6324b6e..03a20fa501 100644 --- a/exercises/practice/protein-translation/protein_translation_test.py +++ b/exercises/practice/protein-translation/protein_translation_test.py @@ -1,6 +1,6 @@ # These tests are auto-generated with test data from: # https://github.com/exercism/problem-specifications/tree/main/exercises/protein-translation/canonical-data.json -# File last updated on 2023-07-19 +# File last updated on 2024-07-08 import unittest @@ -134,3 +134,8 @@ def test_translation_stops_if_stop_codon_in_middle_of_six_codon_sequence(self): value = "UGGUGUUAUUAAUGGUUU" expected = ["Tryptophan", "Cysteine", "Tyrosine"] self.assertEqual(proteins(value), expected) + + def test_sequence_of_two_non_stop_codons_does_not_translate_to_a_stop_codon(self): + value = "AUGAUG" + expected = ["Methionine", "Methionine"] + self.assertEqual(proteins(value), expected)