55 CustomBumpRule ,
66 SemVerIncrement ,
77 _find_highest_increment ,
8- find_increment_by_callable ,
98)
109from commitizen .defaults import (
1110 BUMP_MAP ,
@@ -186,7 +185,7 @@ def get_increment(self, bump_rule):
186185 def test_single_commit (self , get_increment ):
187186 commit_messages = ["feat: add new feature" ]
188187 assert (
189- find_increment_by_callable (commit_messages , get_increment )
188+ SemVerIncrement . get_highest_by_messages (commit_messages , get_increment )
190189 == SemVerIncrement .MINOR
191190 )
192191
@@ -197,7 +196,7 @@ def test_multiple_commits(self, get_increment):
197196 "docs: update readme" ,
198197 ]
199198 assert (
200- find_increment_by_callable (commit_messages , get_increment )
199+ SemVerIncrement . get_highest_by_messages (commit_messages , get_increment )
201200 == SemVerIncrement .MINOR
202201 )
203202
@@ -207,7 +206,7 @@ def test_breaking_change(self, get_increment):
207206 "feat!: breaking change" ,
208207 ]
209208 assert (
210- find_increment_by_callable (commit_messages , get_increment )
209+ SemVerIncrement . get_highest_by_messages (commit_messages , get_increment )
211210 == SemVerIncrement .MAJOR
212211 )
213212
@@ -216,7 +215,7 @@ def test_multi_line_commit(self, get_increment):
216215 "feat: new feature\n \n BREAKING CHANGE: major change" ,
217216 ]
218217 assert (
219- find_increment_by_callable (commit_messages , get_increment )
218+ SemVerIncrement . get_highest_by_messages (commit_messages , get_increment )
220219 == SemVerIncrement .MAJOR
221220 )
222221
@@ -225,11 +224,17 @@ def test_no_increment_needed(self, get_increment):
225224 "docs: update documentation" ,
226225 "style: format code" ,
227226 ]
228- assert find_increment_by_callable (commit_messages , get_increment ) is None
227+ assert (
228+ SemVerIncrement .get_highest_by_messages (commit_messages , get_increment )
229+ is None
230+ )
229231
230232 def test_empty_commits (self , get_increment ):
231233 commit_messages = []
232- assert find_increment_by_callable (commit_messages , get_increment ) is None
234+ assert (
235+ SemVerIncrement .get_highest_by_messages (commit_messages , get_increment )
236+ is None
237+ )
233238
234239 def test_major_version_zero (self ):
235240 bump_rule = ConventionalCommitBumpRule ()
@@ -239,7 +244,7 @@ def test_major_version_zero(self):
239244 "BREAKING CHANGE: major change" ,
240245 ]
241246 assert (
242- find_increment_by_callable (
247+ SemVerIncrement . get_highest_by_messages (
243248 commit_messages , lambda x : bump_rule .get_increment (x , True )
244249 )
245250 == SemVerIncrement .MINOR
@@ -253,7 +258,7 @@ def test_mixed_commit_types(self, get_increment):
253258 "refactor: restructure code" ,
254259 ]
255260 assert (
256- find_increment_by_callable (commit_messages , get_increment )
261+ SemVerIncrement . get_highest_by_messages (commit_messages , get_increment )
257262 == SemVerIncrement .MINOR
258263 )
259264
@@ -263,7 +268,7 @@ def test_commit_with_scope(self, get_increment):
263268 "fix(ui): fix button alignment" ,
264269 ]
265270 assert (
266- find_increment_by_callable (commit_messages , get_increment )
271+ SemVerIncrement . get_highest_by_messages (commit_messages , get_increment )
267272 == SemVerIncrement .MINOR
268273 )
269274
@@ -393,7 +398,7 @@ def test_with_find_increment_by_callable(self, custom_bump_rule):
393398 "docs: update readme [MINOR]" ,
394399 ]
395400 assert (
396- find_increment_by_callable (
401+ SemVerIncrement . get_highest_by_messages (
397402 commit_messages , lambda x : custom_bump_rule .get_increment (x , False )
398403 )
399404 == SemVerIncrement .MAJOR
@@ -577,7 +582,7 @@ def test_with_find_increment_by_callable(self, custom_bump_rule):
577582 "perf: improve performance" ,
578583 ]
579584 assert (
580- find_increment_by_callable (
585+ SemVerIncrement . get_highest_by_messages (
581586 commit_messages , lambda x : custom_bump_rule .get_increment (x , False )
582587 )
583588 == SemVerIncrement .MAJOR
0 commit comments