tests.test_self_pin module

Tests for the spellings of the upstream toolkit’s pin on itself.

tests.test_self_pin.UPSTREAM_REF = 'jobs:\n  lint:\n    uses: kdeldycke/repomatic/.github/workflows/lint.yaml@1234567890abcdef1234567890abcdef12345678 # v6.29.0\n'

A SHA-pinned thin-caller ref to the upstream toolkit, declaring v6.29.0.

tests.test_self_pin.PIN_SHAPES = ((("uvx --no-progress 'repomatic=={}' show-metadata",), (), 'quoted-uvx'), (('uvx repomatic=={} show-metadata',), (), 'bare-uvx'), (("uv tool install 'repomatic=={}'",), (), 'tool-install'), (("uvx --with 'repomatic[cli]=={}' papaya",), (), 'with-extras'), (('pip install repomatic=={}',), (), 'pip-install'))

Every shape a workflow writes the self-pin in, with a {} for the version.

tests.test_self_pin.test_sync_fixes_every_pin_the_lint_flags(shape)[source]

sync-workflow-pins rewrites each pin shape the lockstep check reads.

A shape the check reads and the rewrite skips leaves lint-repo red until a human edits the workflow, with no pull request to say why.

Return type:

None

tests.test_self_pin.test_inline_pin_shapes_are_read(shape)[source]

Every shape a workflow writes the pin in is one the matcher reads.

Return type:

None

tests.test_self_pin.test_inline_pin_matcher_ignores_other_text(text)[source]

A name ending in the package, the exemption, and a floor pin nothing.

Return type:

None

tests.test_self_pin.test_align_inline_pins(content, expected, changes)[source]

Every pin moves onto the version, extras kept, and each move is reported.

Return type:

None

tests.test_self_pin.test_cooldown_exemption_names_its_package()[source]

A fork under another name gets an exemption for its own package.

Return type:

None

tests.test_self_pin.test_frozen_invocation_is_what_the_unfreeze_matches()[source]

The freeze writes one spelling, and the unfreeze recognizes it.

Return type:

None

tests.test_self_pin.test_spliced_exemption_converges_on_the_frozen_spelling()[source]

A bare uvx pin gains the exemption the freeze writes, and only once.

Return type:

None

tests.test_self_pin.test_lint_reads_the_exemption_the_splice_writes(exempt)[source]

The exemption check and the splice agree on what an exempt command is.

Return type:

None