Skip to content

Commit

Permalink
test(cli): change type comparison to use is
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Jul 1, 2024
1 parent 4371578 commit 994acfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_commitizen_excepthook(capsys):
with pytest.raises(SystemExit) as excinfo:
cli.commitizen_excepthook(NotAGitProjectError, NotAGitProjectError(), "")

assert excinfo.type == SystemExit
assert excinfo.type is SystemExit
assert excinfo.value.code == NotAGitProjectError.exit_code


Expand All @@ -101,7 +101,7 @@ def test_commitizen_debug_excepthook(capsys):
debug=True,
)

assert excinfo.type == SystemExit
assert excinfo.type is SystemExit
assert excinfo.value.code == NotAGitProjectError.exit_code
assert "NotAGitProjectError" in str(excinfo.traceback[0])

Expand Down Expand Up @@ -132,7 +132,7 @@ def test_commitizen_excepthook_no_raises(capsys):
no_raise=[NotAGitProjectError.exit_code],
)

assert excinfo.type == SystemExit
assert excinfo.type is SystemExit
assert excinfo.value.code == 0


Expand Down

0 comments on commit 994acfc

Please sign in to comment.