From 802ae291769ca451e3577597c024e7949f6334d1 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung Date: Sat, 7 Feb 2026 10:03:46 +0800 Subject: [PATCH] test: add deprecated test back --- tests/commands/test_bump_command.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index ef950e7ca..5b9787695 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -1494,6 +1494,16 @@ def test_changelog_config_flag_merge_prerelease_only_prerelease_present( file_regression.check(out, extension=".md") +@pytest.mark.usefixtures("tmp_commitizen_project") +def test_bump_deprecate_files_only(util: UtilFixture): + util.create_file_and_commit("feat: new file") + with ( + pytest.warns(DeprecationWarning, match=r".*--files-only.*deprecated"), + pytest.raises(ExpectedExit), + ): + util.run_cli("bump", "--yes", "--files-only") + + @pytest.mark.parametrize( ("prerelease", "merge"), [