Files
douyin_guaji-main/tests/unit/test_path_config.py
T
Your Name e68f1dd3de feat: Refactor coverage management and enhance logging functionality
- Removed the `.coverage` file from the repository to streamline coverage management.
- Updated `.gitignore` to exclude coverage-related files and directories, ensuring a cleaner project structure.
- Introduced new scripts for checking GPU availability and detecting GUI parameter conflicts, enhancing the overall functionality of the application.
- Improved logging mechanisms across various modules to support better debugging and monitoring.
- Added comprehensive documentation for new features and updated existing markdown files for clarity.
2025-12-23 02:38:51 +08:00

50 lines
935 B
Python

"""
path_config模块测试
"""
import os
import pytest
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