def test_insixwords(self): intext = "#SomethingInSixWords" how_many = inxwords.ends_with_in_x_words(intext) self.assertEqual(how_many, 6)
def test_infivewords(self): intext = "#SomethingInFiveWords" how_many = inxwords.ends_with_in_x_words(intext) self.assertEqual(how_many, 5)
def test_myfeelingsinthreewords(self): intext = "#MyFeelingsInThreeWords" how_many = inxwords.ends_with_in_x_words(intext) self.assertEqual(how_many, 3)
def test_grammysin5words(self): intext = "#GrammysIn5Words" how_many = inxwords.ends_with_in_x_words(intext) self.assertEqual(how_many, 5)
def test_not_found(self): intext = "#cymruambyth" how_many = inxwords.ends_with_in_x_words(intext) self.assertEqual(how_many, 0)
def test_none(self): intext = None how_many = inxwords.ends_with_in_x_words(intext) self.assertEqual(how_many, 0)