From 4841dc05aa7674fb80f336c023091142f0cda4c6 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Wed, 23 Oct 2024 18:19:34 +1100 Subject: [PATCH] Update resistor_color_expert_test.py Add additional tests for some edge cases. Note that "1 ohms", "1 kiloohms" and "1 megaohms" should really be "ohm" singular but that's out of scope of the requirements for this exercise. --- .../resistor_color_expert_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/exercises/practice/resistor-color-expert/resistor_color_expert_test.py b/exercises/practice/resistor-color-expert/resistor_color_expert_test.py index 2ba4b877d9..47e7fc6344 100644 --- a/exercises/practice/resistor-color-expert/resistor_color_expert_test.py +++ b/exercises/practice/resistor-color-expert/resistor_color_expert_test.py @@ -49,3 +49,13 @@ def test_brown_red_orange_green_and_blue(self): self.assertEqual( resistor_label(["brown", "red", "orange", "green", "blue"]), "12.3 megaohms ±0.25%" ) + + def test_brown_black_brown_yellow_and_violet(self): + self.assertEqual( + resistor_label(["brown", "black", "brown", "yellow", "violet"]), "1.01 megaohms ±0.1%" + ) + + def test_brown_black_red_and_red(self): + self.assertEqual( + resistor_label(["brown", "black", "red", "red"]), "1 kiloohms ±2%" + )