tests.test_plugin_update_detection module¶
Which manifest’s version the Claude Code CLI reads to detect an update.
Two manifests carry a version: the marketplace entry, and the plugin’s own
.claude-plugin/plugin.json. The release freeze stamps both, so the plugin ships
correctly whichever one a client reads. The docs state which one the CLI reads,
and this is what keeps that statement honest.
Measured against Claude Code 2.1.274: the CLI compares plugin.json and ignores
the catalog entry, for a path source and a git-subdir source alike. The
Desktop app, which the docs also cover, is out of reach of any test here.
Caution
This measures a behavior Anthropic can change without a version bump, so a failure here is a signal to re-read the docs page, not a bug in this repository.
The scene is built under tmp_path with its own CLAUDE_CONFIG_DIR, and the
plugin’s remote is a file:// URL onto a second scratch repository, so nothing
leaves the machine and parallel workers cannot collide.
- tests.test_plugin_update_detection.TIMEOUT = 120¶
Seconds any one CLI call may take before the probe fails instead of hanging.
- tests.test_plugin_update_detection.test_cli_update_detection_reads_the_plugin_manifest(tmp_path)[source]¶
Bump each version on its own and see which one the CLI reacts to.
The four cases are one test rather than four parametrized ones because two of them are controls for the other two: a run where the controls misbehave says nothing about the question, and splitting them would let that run report a verdict anyway.
- Return type: