Created
November 5, 2018 09:49
-
-
Save LucasMagnum/d637f485e253a2da12f26a2e2fd5f3d8 to your computer and use it in GitHub Desktop.
Revisions
-
Lucas Magnum created this gist
Nov 5, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ import unittest from words_analysis import get_most_common_words class TestWordsAnalysis(unittest.TestCase): def test_get_most_common_words_should_return_the_expected_words(self): data = [ 'python', 'ruby', 'java', 'python', 'earlang', 'java', 'golang', 'javascript', 'python' ] expected = [ ('python', 3), ('java', 2) ] most_common_words = get_most_common_words(data, 2) assert most_common_words == expected