예제 #1
0
 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)
예제 #2
0
 def test_span_property(self):
     token = Token('text', 1, 3)
     eq_((1, 3), token.span)
예제 #3
0
 def test_start_property(self):
     token = Token('text', 1, 3)
     eq_(1, token.start)
예제 #4
0
 def test_end_property(self):
     token = Token('text', 1, 3)
     eq_(3, token.end)
예제 #5
0
 def test_text_property(self):
     token = Token('text', 1, 3)
     eq_('text', token.text)