Skip to content

Commit

Permalink
add nagisa.utils test to nagisa_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
taishi-i committed Jul 4, 2020
1 parent ab4d4a7 commit 21961ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/nagisa_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ def test_utils(self):
self.assertEqual(output, nagisa.utils.PAD)

# test_22
text = "Python"
output = ['P', 'y', 't', 'h', 'o', 'n']
text = "Python"
text = nagisa.utils.preprocess(text)
text = text.lower()
output = ['p', 'y', 't', 'h', 'o', 'n']
unigrams = nagisa.utils.get_unigram(text)

self.assertEqual(output, unigrams)

def test_fit(self):
Expand Down

0 comments on commit 21961ea

Please sign in to comment.