Skip to content

pangram tests updated to 1.3 #1039

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

Merged
merged 7 commits into from
Jan 9, 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
15 changes: 9 additions & 6 deletions exercises/pangram/pangram_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
from pangram import is_pangram


# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0

class PangramTests(unittest.TestCase):

def test_sentence_empty(self):
self.assertIs(is_pangram(''), False)

def test_recognizes_a_perfect_lower_case_pangram(self):
self.assertIs(is_pangram('abcdefghijklmnopqrstuvwxyz'), True)

def test_pangram_with_only_lower_case(self):
self.assertIs(
is_pangram('the quick brown fox jumps over the lazy dog'),
Expand All @@ -20,10 +24,9 @@ def test_missing_character_x(self):
'jeopardize five gunboats'),
False)

def test_another_missing_character_x(self):
self.assertIs(
is_pangram('the quick brown fish jumps over the lazy dog'),
False)
def test_another_missing_character(self):
self.assertIs(is_pangram('five boxing wizards jump quickly at it'),
False)

def test_pangram_with_underscores(self):
self.assertIs(
Expand All @@ -47,7 +50,7 @@ def test_pangram_with_mixedcase_and_punctuation(self):

def test_upper_and_lower_case_versions_of_the_same_character(self):
self.assertIs(
is_pangram('the quick brown fox jumped over the lazy FOX'),
is_pangram('the quick brown fox jumped over the lazy FX'),
False)


Expand Down