Update test_code_option_safe to work with click 8.2.0 (#4666)

This commit is contained in:
danigm 2025-05-15 14:04:00 +02:00 committed by GitHub
parent 314f8cf92b
commit b0f36f5b42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1907,7 +1907,8 @@ def test_code_option_safe(self) -> None:
args = ["--safe", "--code", code]
result = CliRunner().invoke(black.main, args)
self.compare_results(result, error_msg, 123)
assert error_msg == result.output
assert result.exit_code == 123
def test_code_option_fast(self) -> None:
"""Test that the code option ignores errors when the sanity checks fail."""