Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isbn-verifier: update tests to v2.4.0 #1373

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions exercises/isbn-verifier/isbn_verifier_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from isbn_verifier import verify


# Tests adapted from `problem-specifications//canonical-data.json` @ v2.2.0
# Tests adapted from `problem-specifications//canonical-data.json` @ v2.4.0

class IsbnVerifierTests(unittest.TestCase):

Expand All @@ -20,7 +20,7 @@ def test_invalid_check_digit_other_than_X(self):
self.assertIs(verify('3-598-21507-A'), False)

def test_invalid_character_in_isbn(self):
self.assertIs(verify('3-598-2K507-0'), False)
self.assertIs(verify('3-598-P1581-X'), False)

def test_invalid_X_other_than_check_digit(self):
self.assertIs(verify('3-598-2X507-9'), False)
Expand Down Expand Up @@ -49,6 +49,9 @@ def test_invalid_check_digit_X_used_for_0(self):
def test_valid_empty_isbn(self):
self.assertIs(verify(''), False)

def test_input_is_nine_characters(self):
self.assertIs(verify('134456729'), False)


if __name__ == '__main__':
unittest.main()