Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.6"
questionary = "^1.4"
questionary = "^1.4.0"
decli = "^0.5.0"
colorama = "^0.4.1"
termcolor = "^1.1"
Expand Down
9 changes: 6 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def test_ls(mocker, capsys):

def test_version(mocker):
testargs = ["cz", "--version"]
with pytest.raises(SystemExit):
mocker.patch.object(sys, "argv", testargs)
cli.main()
mocker.patch.object(sys, "argv", testargs)
error_mock = mocker.patch("commitizen.out.error")

cli.main()

error_mock.assert_called_once()
3 changes: 2 additions & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def test_commit_when_nothing_to_commit(mocker):
def test_commit_when_customized_expected_raised(mocker, capsys):
_err = ValueError()
_err.__context__ = CzException("This is the root custom err")

git_mock = mocker.patch("commitizen.git.is_staging_clean")
git_mock.return_value = False
prompt_mock = mocker.patch("questionary.prompt")
prompt_mock.side_effect = _err

Expand Down