コード例 #1
0
 def test_pickle(self):
     word = Word('text', 1000, 100, 10)
     word2 = pickle.loads(pickle.dumps(word))
     eq_(word2.text, word.text)
     eq_(word2.index, word.index)
     eq_(word2.count, word.count)
     eq_(word2.doc_count, word.doc_count)
コード例 #2
0
 def test_index_property(self):
     word = Word('text', 1000, 100, 10)
     eq_(word.index, 1000)
コード例 #3
0
 def test_doc_count_property(self):
     word = Word('text', 1000, 100, 10)
     eq_(word.doc_count, 10)
コード例 #4
0
 def test_text_property(self):
     word = Word('text', 1000, 100, 10)
     eq_(word.text, 'text')