← 返回
未分类

test-fixture-generator

Automatically generate pytest fixtures for databases, API mocks, and file handling with setup and teardown support.
自动为数据库、API 模拟和文件处理生成 pytest fixtures,支持 setup 和 teardown。
shenghoo123-png shenghoo123-png 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 303
下载
💾 1
安装
1
版本
#latest

概述

test-fixture-generator

名称

test-fixture-generator

描述

自动生成pytest fixtures的工具,支持常见测试场景(数据库、API mock、文件处理等)

触发词

fixture, pytest fixture, conftest, 测试夹具

指令

生成pytest fixtures代码

使用方式

# 生成数据库fixture
python -m test_fixture_generator generate --type db --db-type mysql

# 生成API mock fixture
python -m test_fixture_generator generate --type api --framework requests

# 生成文件处理fixture
python -m test_fixture_generator generate --type file --format json

# 生成conftest.py
python -m test_fixture_generator init

# 交互式生成
python -m test_fixture_generator interactive

参数说明

  • --type: fixture类型 (db|api|file|random)
  • --db-type: 数据库类型 (mysql|postgres|sqlite)
  • --framework: mock框架 (requests|httpx|boto3)
  • --format: 文件格式 (json|yaml|csv|toml)
  • --output: 输出文件路径

输出

生成符合pytest规范的fixture代码,自动处理setup/teardown

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 19:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Cleaner Skill

shenghoo123-png
AI驱动的Excel/CSV数据清洗工具,可去重、处理缺失值、标准化格式、检测异常值,并支持批量处理。
★ 0 📥 793
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 75 📥 182,273
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 328,863