Skip to content

Commit 341cbd7

Browse files
committed
word-count: Updated to 1.4.0
1 parent 0a69efc commit 341cbd7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

exercises/word-count/word_count_test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from word_count import count_words
44

55

6-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0
6+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0
77

88
class WordCountTest(unittest.TestCase):
99

@@ -68,6 +68,13 @@ def test_with_quotations(self):
6868
'and': 1}
6969
)
7070

71+
def test_substring_from_the_beginning(self):
72+
self.assertEqual(
73+
count_words("Joe can't tell between app, apple and a."),
74+
{'joe': 1, "can't": 1, 'tell': 1, 'between': 1,
75+
'app': 1, 'apple': 1, 'and': 1, 'a':1}
76+
)
77+
7178
def test_multiple_spaces_not_detected_as_a_word(self):
7279
self.assertEqual(
7380
count_words(' multiple whitespaces'),

0 commit comments

Comments
 (0)