Skip to content
Merged
10 changes: 10 additions & 0 deletions exercises/word-count/.meta/additional_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
"is": 1,
"broken": 1
}
},
{
"description": "multiple apostrophes ignored",
"property": "countWords",
"input": {
"sentence": "''hey''"
},
"expected": {
"hey": 1
}
}
]
}
3 changes: 3 additions & 0 deletions exercises/word-count/word_count_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def test_non_alphanumeric(self):
{"hey": 1, "my": 1, "spacebar": 1, "is": 1, "broken": 1},
)

def test_multiple_apostrophes_ignored(self):
self.assertEqual(count_words("''hey''"), {"hey": 1})


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