Skip to content

Commit cc146fa

Browse files
authored
[luhn] bump to 1.7.0 (#2171)
* [luhn] bump to 1.7.0 Bump `luhn` to latest version of the canonical data. * bump CI
1 parent b898807 commit cc146fa

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
@@ -2,7 +2,7 @@
22

33
from luhn import Luhn
44

5-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.6.1
5+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.7.0
66

77

88
class LuhnTest(unittest.TestCase):
@@ -27,6 +27,9 @@ def test_invalid_canadian_sin(self):
2727
def test_invalid_credit_card(self):
2828
self.assertIs(Luhn("8273 1232 7352 0569").valid(), False)
2929

30+
def test_invalid_long_number_with_an_even_remainder(self):
31+
self.assertIs(Luhn("1 2345 6789 1234 5678 9012").valid(), False)
32+
3033
def test_valid_number_with_an_even_number_of_digits(self):
3134
self.assertIs(Luhn("095 245 88").valid(), True)
3235

0 commit comments

Comments
 (0)