MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / test_resource_zip_text_dictionary_support

Function test_resource_zip_text_dictionary_support

python/tests/test_opencc.py:106–115  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

104
105
106def test_resource_zip_text_dictionary_support(tmp_path):
107 import opencc
108
109 resource_zip = tmp_path / 'opencc-resources.zip'
110 _write_resource_zip(str(resource_zip))
111 converter = opencc.OpenCC(
112 's2twp.json',
113 resource_zip=str(resource_zip),
114 )
115 assert converter.convert('打印机和鼠标') == '印表機和滑鼠'
116
117
118def test_builtin_config_stem_is_normalized():

Callers

nothing calls this directly

Calls 3

convertMethod · 0.95
strClass · 0.85
_write_resource_zipFunction · 0.70

Tested by

no test coverage detected