diff --git a/.gitignore b/.gitignore index 0de653f2..36187487 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ *.pyc __pycache__/ .tox/ +env/ +build/ +dist/ +eggs/ +.eggs/ +*.egg +*.egg-info/ diff --git a/tests/test_jieba.py b/tests/test_jieba.py deleted file mode 100644 index 68318cf1..00000000 --- a/tests/test_jieba.py +++ /dev/null @@ -1,27 +0,0 @@ -import jieba -import pytest - - -def test_jieba_segmentation(): - """ - Tests the segmentation of a Chinese text string using the jieba library. - This function does not take any parameters and does not return anything. - """ - text = "我爱自然语言处理" - seg_list = jieba.cut(text, cut_all=False) - assert list(seg_list) == ['我', '爱', '自然语言处理'] - -def test_jieba_import(): - """ - Tests the import of the jieba library. This function does not take any parameters and does not return anything. - """ - assert jieba is not None - -def test_jieba_tokenization(): - """ - Tests the tokenization of a Chinese text string using the jieba library. - This function does not take any parameters and does not return anything. - """ - text = "我爱自然语言处理" - tokens = jieba.tokenize(text) - assert list(tokens) == [('我', 0, 1), ('爱', 1, 2), ('自然语言处理', 2, 8)]