def METHOD_NAME(self):
    eq = self.assertEqual
    delete = self.text.delete
    get = self.text.get
    write = self.window.write
    # No new line - insert stays on same line.
    delete('1.0', 'end')
    test_text = 'test text'
    eq(write(test_text), len(test_text))
    eq(get('1.0', '1.end'), 'test text')
    eq(get('insert linestart', 'insert lineend'), 'test text')
    # New line - insert moves to next line.
    delete('1.0', 'end')
    test_text = 'test text\n'
    eq(write(test_text), len(test_text))
    eq(get('1.0', '1.end'), 'test text')
    eq(get('insert linestart', 'insert lineend'), '')
    # Text after new line is tagged for second line of Text widget.
    delete('1.0', 'end')
    test_text = 'test text\nLine 2'
    eq(write(test_text), len(test_text))
    eq(get('1.0', '1.end'), 'test text')
    eq(get('2.0', '2.end'), 'Line 2')
    eq(get('insert linestart', 'insert lineend'), 'Line 2')
    # Test tags.
    delete('1.0', 'end')
    test_text = 'test text\n'
    test_text2 = 'Line 2\n'
    eq(write(test_text, tags='mytag'), len(test_text))
    eq(write(test_text2, tags='secondtag'), len(test_text2))
    eq(get('mytag.first', 'mytag.last'), test_text)
    eq(get('secondtag.first', 'secondtag.last'), test_text2)
    eq(get('1.0', '1.end'), test_text.rstrip('\n'))
    eq(get('2.0', '2.end'), test_text2.rstrip('\n'))