コード例 #1
0
ファイル: tests.py プロジェクト: sjolicoeur/spellcheck
 def test_on_erroneous_input_make_no_recommendation(self):
     expected_output = "NO SUGGESTION"
     input_string = "" 
     output = recommend_correction(input_string, self.fl_index)
     assert output == expected_output, output
     input_string = "sheeple"
     output = recommend_correction(input_string, self.fl_index)
     assert output == expected_output, output
コード例 #2
0
ファイル: tests.py プロジェクト: sjolicoeur/spellcheck
 def test_expect_sheeppen(self) :
     assert recommend_correction("sheeppan", self.fl_index) == 'sheeppen'
コード例 #3
0
ファイル: tests.py プロジェクト: sjolicoeur/spellcheck
 def test_expect_conspiracy(self) :
     assert recommend_correction("CUNsperrICY", self.fl_index) == 'conspiracy'
コード例 #4
0
ファイル: tests.py プロジェクト: sjolicoeur/spellcheck
 def test_expect_wake(self) :   
     assert recommend_correction("weke", self.fl_index) == 'wake'
コード例 #5
0
ファイル: tests.py プロジェクト: sjolicoeur/spellcheck
 def test_expect_people(self) :
     assert recommend_correction("peeple", self.fl_index) == 'people'