← Về thư mục
tests/imaging-data-commons/test_check_version.py
- TestParseVersion · class · L35-L55 — class TestParseVersion
- test_orders_numerically · method · L36-L38 — def test_orders_numerically(self): # String comparison would (wrongly) order "0.12.0" < "0.9.0".
- test_strips_v_prefix · method · L40-L41 — def test_strips_v_prefix(self)
- test_tolerates_prereleases · method · L43-L48 — def test_tolerates_prereleases(self): # A pre-release tag upstream must not crash the startup check. It compares equal # to its base release, so the update notices stay conservative.
- test_pads_short_versions · method · L50-L52 — def test_pads_short_versions(self)
- test_ignores_components_past_the_third · method · L54-L55 — def test_ignores_components_past_the_third(self)
- TestInstallCommands · class · L58-L94 — class TestInstallCommands
- test_pip_form_targets_the_running_interpreter · method · L61-L64 — def test_pip_form_targets_the_running_interpreter(self, monkeypatch)
- test_uv_form_is_preferred_when_uv_is_available · method · L66-L75 — def test_uv_form_is_preferred_when_uv_is_available(self, monkeypatch)
- test_upgrade_flag_applies_to_every_form · method · L77-L80 — def test_upgrade_flag_applies_to_every_form(self, monkeypatch)
- test_no_command_bypasses_an_externally_managed_interpreter · method · L82-L87 — def test_no_command_bypasses_an_externally_managed_interpreter(self, monkeypatch)
- test_instructions_name_the_version_and_the_interpreter · method · L89-L94 — def test_instructions_name_the_version_and_the_interpreter(self, capsys)
- TestNeverInstalls · class · L97-L118 — class TestNeverInstalls
- _source · method · L105-L107 — def _source(self)
- test_source_has_no_installer_call · method · L109-L113 — def test_source_has_no_installer_call(self)
- test_source_has_no_dynamic_execution · method · L115-L118 — def test_source_has_no_dynamic_execution(self): # Downstream registries reject bundled scripts that call eval/exec.
- TestMinimumCheck · class · L121-L148 — class TestMinimumCheck
- test_missing_package_reports_none_and_instructs · method · L124-L131 — def test_missing_package_reports_none_and_instructs(self, monkeypatch, capsys): #
None in sys.modules makes import idc_index raise ImportError, so this test # exercises the not-installed path whether or not the package is present.
- test_older_version_reports_none · method · L133-L136 — def test_older_version_reports_none(self, monkeypatch, capsys)
- test_current_version_is_returned · method · L138-L141 — def test_current_version_is_returned(self, monkeypatch, capsys)
- test_main_exit_code_follows_the_check · method · L143-L148 — def test_main_exit_code_follows_the_check(self, monkeypatch)
- TestNetworkChecksAreBestEffort · class · L151-L166 — class TestNetworkChecksAreBestEffort
- test_fetch_json_returns_none_when_unreachable · method · L152-L154 — def test_fetch_json_returns_none_when_unreachable(self): # .invalid never resolves (RFC 2606), so this stays offline.
- test_notify_updates_survives_an_unreachable_network · method · L156-L158 — def test_notify_updates_survives_an_unreachable_network(self, monkeypatch)
- test_skill_update_notice_is_conservative · method · L160-L166 — def test_skill_update_notice_is_conservative(self, monkeypatch, capsys): # A GitHub tag equal to the shipped version is not an update.
- TestVersionsMatchFrontmatter · class · L169-L188 — class TestVersionsMatchFrontmatter
- _frontmatter · method · L172-L174 — def _frontmatter(self)
- test_min_version_matches_metadata · method · L176-L178 — def test_min_version_matches_metadata(self)
- test_skill_version_matches_metadata · method · L180-L188 — def test_skill_version_matches_metadata(self): #
metadata.version is this repository's skill version; the script pins the # upstream release it came from, recorded as source-skill-version. The script # compares it against upstream's GitHub releases to notify about skill updates, # so a stale value points users at a release they already have.
- _FakeIdcIndex · class · L191-L195 — class _FakeIdcIndex
- init · method · L194-L195 — def init(self, version)