您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

test_text_processing.py 562B

1234567891011121314151617181920
  1. from textwrap import dedent
  2. import pytest
  3. from core.tools.utils.text_processing_utils import remove_leading_symbols
  4. @pytest.mark.parametrize(
  5. ("input_text", "expected_output"),
  6. [
  7. ("...Hello, World!", "Hello, World!"),
  8. ("。测试中文标点", "测试中文标点"),
  9. ("!@#Test symbols", "Test symbols"),
  10. ("Hello, World!", "Hello, World!"),
  11. ("", ""),
  12. (" ", " "),
  13. ],
  14. )
  15. def test_remove_leading_symbols(input_text, expected_output):
  16. assert remove_leading_symbols(input_text) == expected_output