def METHOD_NAME(self):
    text = self.text
    previous = self.auto_expand.getprevword
    equal = self.assertEqual
    equal(previous(), '')
    text.insert('insert', 't')
    equal(previous(), 't')
    text.insert('insert', 'his')
    equal(previous(), 'this')
    text.insert('insert', ' ')
    equal(previous(), '')
    text.insert('insert', 'is')
    equal(previous(), 'is')
    text.insert('insert', '\nsample\nstring')
    equal(previous(), 'string')
    text.delete('3.0', 'insert')
    equal(previous(), '')
    text.delete('1.0', 'end')
    equal(previous(), '')