[pytest] # 添加命令行选项 addopts = --verbose --tb=short --cov=kag --cov-report=term-missing -rs # 忽略某些目录 norecursedirs = tests/unit/solver # 指定测试文件名模式 python_files = test_*.py *_test.py # 指定测试类名模式 python_classes = Test* *Test # 指定测试函数名模式 python_functions = test_* # 指定测试模块名模式 python_modules = test_* # 指定测试文件路径 testpaths = tests # 指定日志配置 log_level = INFO log_format = %(asctime)s %(levelname)s %(message)s log_date_format = %Y-%m-%d %H:%M:%S # 指定自定义标记 markers = slow: marks tests as slow (deselect with '-m "not slow"') smoke: marks tests as smoke tests (deselect with '-m "not smoke"')