Files
douyin_guaji-main/tests/unit/test_path_config.py
T
Your Name f92933641f feat: Enhance documentation and clean up code structure
- Added comprehensive documentation for the unified screenshot and score recording process in the new markdown file.
- Improved existing markdown files by adding spacing for better readability.
- Cleaned up code by removing unnecessary blank lines across various scripts, enhancing overall code clarity.
- Updated configuration settings to reflect recent changes and ensure consistency across the project.
- Enhanced logging mechanisms to support better debugging and monitoring.
2025-12-25 16:11:25 +08:00

59 lines
960 B
Python

"""
path_config模块测试
"""
import os
import pytest # type: ignore
from pathlib import Path
import path_config
class TestPathConfig:
"""路径配置测试类"""
def test_get_screenshot_path(self):
"""测试获取截图路径"""
path = path_config.get_screenshot_path()
assert path is not None
assert isinstance(path, str)
assert path.endswith(".png") or path.endswith("screenshot.png")
def test_get_pic_dir(self):
"""测试获取图片目录"""
pic_dir = path_config.get_pic_dir()
assert pic_dir is not None
assert isinstance(pic_dir, str)
assert os.path.isabs(pic_dir) or pic_dir.startswith("pic")
def test_paths_exist_or_creatable(self, temp_dir):
"""测试路径可以创建"""
# 这个测试需要确保路径可以创建
# 实际测试中可能需要mock文件系统操作
pass