def test_doc_subset(self):
    doc = iter('A simple test\n        with multiple\n        lines\n        of text\n        '.splitlines())
    pos = Token(start=3, end=54, start_line=1, start_char=8, end_line=2, end_char=11)
    expected = u'with multiple\n        lin'
    tst = doc_subset(iter(doc), pos)
    result = u'\n'.join(tst)
    assert (expected == result)
def test_doc_subset(self):
    doc = iter('A simple test\n        with multiple\n        lines\n        of text\n        '.splitlines())
    pos = Token(start=3, end=54, start_line=1, start_char=8, end_line=2, end_char=11)
    expected = u'with multiple\n        lin'
    tst = doc_subset(iter(doc), pos)
    result = u'\n'.join(tst)
    assert (expected == result)