(
config, capsys, next_increment: str, current_version: str, expected_version: str
)
| 223 | ], |
| 224 | ) |
| 225 | def 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 | |
| 252 | def test_next_version_invalid_version(config, capsys): |
nothing calls this directly
no outgoing calls
no test coverage detected