def test_pickle(self): token = pickle.loads(pickle.dumps(Token('text', 1, 3))) eq_('text', token.text) eq_(1, token.start) eq_(3, token.end)
def test_span_property(self): token = Token('text', 1, 3) eq_((1, 3), token.span)
def test_start_property(self): token = Token('text', 1, 3) eq_(1, token.start)
def test_end_property(self): token = Token('text', 1, 3) eq_(3, token.end)
def test_text_property(self): token = Token('text', 1, 3) eq_('text', token.text)