Esempio n. 1
0
 def test_with_words(self):
     v = WordTypeQuantities.TentativeCheck()
     cases = {
         """I was nervous because I had never been in  a strip club before, it was like entering a building where people danced on poles for money; it was exactly that type of place.""":
         0,
         """Perhaps there are aliens on Mars, we will only truly know when we ask.""":
         1,
         """Things that seem bad always maybe appear to be worse""":
         3
     }
     for (words, count) in cases.items():
         d = Data(words, True)
         assert (v.build(d) == count)
         d = Data(words, False)
         assert (v.build(d) == count)
Esempio n. 2
0
 def test_empty(self):
     v = WordTypeQuantities.TentativeCheck()
     d = Data("", True)
     assert (v.build(d) == 0)
     d = Data("", False)
     assert (v.build(d) == 0)