MCPcopy Create free account
hub / github.com/hankcs/HanLP / test_threading

Method test_threading

tests/test_mtl.py:60–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 )
59
60 def test_threading(self):
61 num_proc = 8
62 with Pool(num_proc) as pool:
63 results = pool.starmap(tokenize, [(mtl, '商品和服务')] * num_proc)
64 self.assertSequenceEqual(results, [['商品', '和', '服务']] * num_proc)
65
66 def test_emoji(self):
67 self.assertSequenceEqual(mtl('( ͡° ͜ʖ ͡ °)你好', tasks='tok/fine')['tok/fine'],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected