コード例 #1
0
 def test_remove_stopword_empty_input(self):
     # Setup
     input_text = ''
     expected_output = []
     # Actual call
     output_text = remove_stopword(input_text)
     # Asserts
     self.assertListEqual(output_text, expected_output)
コード例 #2
0
 def test_remove_stopword_no_stopword(self):
     # Setup
     input_text = 'Hello World.'
     expected_output = ['Hello', 'World', '.']
     # Actual call
     output_text = remove_stopword(input_text)
     # Asserts
     self.assertListEqual(output_text, expected_output)
コード例 #3
0
 def test_remove_stopword_all_stopwords(self):
     # Setup
     input_text = 'the a your my his her'
     expected_output = []
     # Actual call
     output_text = remove_stopword(input_text)
     # Asserts
     self.assertListEqual(output_text, expected_output)
コード例 #4
0
 def test_remove_stopword(self):
     # Setup
     input_text = "This is a test!"
     expected_output = ['This', 'test', '!']
     # Actual call
     output_text = remove_stopword(input_text)
     # Asserts
     self.assertListEqual(output_text, expected_output)