You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
725 B

import sys
import os
# Add src to path
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'src'))
from visualization import Visualizer
def test_visualization():
viz = Visualizer()
print(f"Using font: {viz.font_path}")
words = ["大语言模型", "AI", "人工智能", "深度学习", "神经网络", "ChatGPT", "LLM", "技术", "未来", "发展"] * 5
output_path = "tests/test_wordcloud.png"
print(f"Generating word cloud to {output_path}...")
viz.generate_wordcloud(words, output_path)
if os.path.exists(output_path):
print("Success! Image generated.")
else:
print("Failed! Image not found.")
if __name__ == "__main__":
test_visualization()