Repository navigation
Conversation
1505c2d to
18149b4
Compare
|
Local checks against The existing CLI tests check default tokens and preconstructed argument namespaces, but do not pass a custom @pytest.mark.parametrize(
"part,version,token,expected",
[
("prerelease", "1.2.3", None, "1.2.3-rc.1"),
("build", "1.2.3", None, "1.2.3+build.1"),
("prerelease", "1.2.3", "preview", "1.2.3-preview.1"),
("build", "1.2.3", "ci", "1.2.3+ci.1"),
("prerelease", "1.2.3", "", "1.2.3-1"),
("build", "1.2.3", "", "1.2.3+1"),
("prerelease", "1.2.3-8", "preview", "1.2.3-9"),
("build", "1.2.3+ci.8", "other", "1.2.3+ci.9"),
],
)
def test_should_process_bump_tokens(capsys, part, version, token, expected):
cli = ["bump", part, version]
if token is not None:
cli.extend(["--token", token])
assert main(cli) == 0
captured = capsys.readouterr()
assert captured.out == expected + "\n"
assert captured.err == ""These can use the existing imports in On Python 3.13.16 / pytest 9.1.1, the original suite including doctests passed 354 tests; with these eight cases, 362 passed. Only that Python version was checked, not the whole tox matrix; coverage measurement was not run. Ruff reports the same two pre-existing findings in this test file before and after the addition (I001 and SIM117). |
For the CLI pysemver script, this change introduces a --token option when bumping prereleases or builds.
|
Thank you very much @killtheprompt! 😍 I've included your suggestion into |
For the CLI pysemver script, this change introduces a
--tokenoption when bumping prereleases or builds.