Files
smart-speaker/test_cleaner.py

21 lines
440 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import cleaner
import traceback
try:
print("Testing cleaner...")
text = "В 1999 году."
res = cleaner.clean_response(text)
print(f"Result: {res}")
text = "![image](http://example.com)"
res = cleaner.clean_response(text)
print(f"Result: {res}")
text = "[link](http://example.com)"
res = cleaner.clean_response(text)
print(f"Result: {res}")
except Exception:
traceback.print_exc()