MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / test_next_version

Function test_next_version

tests/commands/test_version_command.py:225–249  ·  view source on GitHub ↗
(
    config, capsys, next_increment: str, current_version: str, expected_version: str
)

Source from the content-addressed store, hash-verified

223 ],
224)
225def test_next_version(
226 config, capsys, next_increment: str, current_version: str, expected_version: str
227):
228 config.settings["version"] = current_version
229 for project in (True, False):
230 commands.Version(
231 config,
232 {
233 "next": next_increment,
234 "project": project,
235 },
236 )()
237 captured = capsys.readouterr()
238 assert expected_version in captured.out
239
240 # Use the same settings to test the manual version
241 commands.Version(
242 config,
243 {
244 "manual_version": current_version,
245 "next": next_increment,
246 },
247 )()
248 captured = capsys.readouterr()
249 assert expected_version in captured.out
250
251
252def test_next_version_invalid_version(config, capsys):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected