Skip to content

Commit efcd4af

Browse files
Nishant23cmccandless
authored andcommitted
luhn: update tests to v1.3.0 (exercism#1605)
Closes exercism#1587
1 parent 273b377 commit efcd4af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

exercises/luhn/luhn_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from luhn import Luhn
66

77

8-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
8+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0
99

1010
class LuhnTest(unittest.TestCase):
1111
def test_single_digit_strings_can_not_be_valid(self):
@@ -29,6 +29,9 @@ def test_invalid_Canadian_SIN(self):
2929
def test_invalid_credit_card(self):
3030
self.assertIs(Luhn("8273 1232 7352 0569").is_valid(), False)
3131

32+
def test_valid_number_with_an_even_number_of_digits(self):
33+
self.assertIs(Luhn("095 245 88").is_valid(), True)
34+
3235
def test_valid_strings_with_a_non_digit_included_become_invalid(self):
3336
self.assertIs(Luhn("055a 444 285").is_valid(), False)
3437

0 commit comments

Comments
 (0)