def test_endsInNewline(self):
        s = 'newline\n'
        m = text.endsInNewline(s)
        self.assertTrue(m)

        s = 'oldline'
        m = text.endsInNewline(s)
        self.assertFalse(m)
Counts the number of occurences of the item in the text
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_text.py/LineTest.test_endsInNewline--crossover with--dataset/ETHPy150Open bigmlcom/python/bigml/predicate.py/count_items_matches