Skip to content

feat(python): discover pytest cases with a build command - #4

Merged
Mucheen merged 1 commit into
codex/2122-python-toolchain-providerfrom
codex/2122-python-command-test-discovery
Nov 19, 2026
Merged

Mucheen merged 1 commit into
codex/2122-python-toolchain-providerfrom
codex/2122-python-command-test-discovery

Conversation

@Mucheen

@Mucheen Mucheen commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

关联 Issue / Linked issue

改动 / Changes

  • buildSystems: 1 的 test.discoveryCommand 使用用户选定解释器,以 -I -B 启动包内脚本。pytest 在构建实例目录收集真实的函数、类、参数化用例与 doctest。写入 litheTestDiscovery v0,经 Core 校验后展示。
  • 报告及 pytest 缓存放在宿主本次发现的可写目录。宿主在完成或取消后回收目录与进程树,脚本保留 45 秒 pytest 上限。无用例时返回空列表,报告超限、选择器无法精确表示或收集失败时终止本次发现。宿主记录一次结构化终态。
  • 移除 Python 提供者已迁移的发现处理。继续由原提供者读取项目模型、运行精确用例和产生 JUnit。真实插件及其端到端测试都在此仓库。
  • 兼容性说明、功能矩阵和 v1.0.0 候选发布说明同时列出 buildSystems:1 和 toolchainProviders:0。待兼容的正式桌面版及维护者批准后再发版。

验证 / Verification

  • macOS ARM64 真包 CLI 12/12。检查项目导入、嵌套实例、精确选择器、无测试、pytest 缺失、语法错误、超长 UTF-8、JUnit 和插件包的 SHA-256。
  • 插件仓库的真实宿主端到端测试在组合桌面 9fe390d08、Core c83f6c0 通过。测试先用上一个 ZIP 复现缺少命令发现,换包后通过项目生成、实际安装与工作台发现、精确重跑、JUnit、报告回收和唯一终态日志。同轮通过解释器动态重选、Pyrefly、debugpy 及安装包只读校验。默认远端 pin 已复验,逐项计时为 2.40 秒与 10.67 秒。正式 0.8.8 安装时返回 plugin.api.unsupported(buildSystems 1)。
  • 桌面合成回归验证进程树取消及迟到结果处理。插件 CI 11/11 通过,覆盖六种归档、Store 及 Linux、macOS、Windows x64、Windows ARM64 的命令测试。Windows 桌面原生窗口仍待实机。

组合 pin 用于草稿复验。待配套 Core 和桌面 PR 合入后,切换到正式兼容修订。

@Mucheen
Mucheen marked this pull request as ready for review November 19, 2026 08:05
@Mucheen
Mucheen merged commit f9fde5a into codex/2122-python-toolchain-provider Nov 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant