Skip to content

Commit 83e71ed

Browse files
authored
Update resistor_color_expert_test.py (#3797)
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.
1 parent 1d2c981 commit 83e71ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

exercises/practice/resistor-color-expert/resistor_color_expert_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,13 @@ def test_brown_red_orange_green_and_blue(self):
4949
self.assertEqual(
5050
resistor_label(["brown", "red", "orange", "green", "blue"]), "12.3 megaohms ±0.25%"
5151
)
52+
53+
def test_brown_black_brown_yellow_and_violet(self):
54+
self.assertEqual(
55+
resistor_label(["brown", "black", "brown", "yellow", "violet"]), "1.01 megaohms ±0.1%"
56+
)
57+
58+
def test_brown_black_red_and_red(self):
59+
self.assertEqual(
60+
resistor_label(["brown", "black", "red", "red"]), "1 kiloohms ±2%"
61+
)

0 commit comments

Comments
 (0)