变更内容: - 删除 `src` 子目录,将模块引用路径从 `src.functional_scaffold` 更新为 `functional_scaffold`。 - 修改相关代码、文档、测试用例及配置文件中的路径引用,包括 `README.md`、`Dockerfile`、`uvicorn` 启动命令等。 - 优化项目目录结构,提升代码维护性和可读性。
24 lines
481 B
Python
24 lines
481 B
Python
"""pytest 配置"""
|
|
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
from functional_scaffold.main import app
|
|
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
"""测试客户端"""
|
|
return TestClient(app)
|
|
|
|
|
|
@pytest.fixture
|
|
def sample_prime_numbers():
|
|
"""质数样本"""
|
|
return [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
|
|
|
|
|
|
@pytest.fixture
|
|
def sample_composite_numbers():
|
|
"""合数样本"""
|
|
return [4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25]
|