@@ -459,6 +459,20 @@ def test_r_scope__scopes(conventional_commit_scope_required):
459459    assert  not  regex .match ("(api; client)" )
460460
461461
462+ def  test_r_scope__scopes_uppercase (conventional_commit_scope_required ):
463+     conventional_commit_scope_required .scopes  =  ["api" , "client" ]
464+     regex  =  re .compile (conventional_commit_scope_required .r_scope )
465+ 
466+     assert  regex .match ("(API)" )
467+     assert  regex .match ("(CLIENT)" )
468+     assert  regex .match ("(API, CLIENT)" )
469+     assert  regex .match ("(API: CLIENT)" )
470+     assert  regex .match ("(API/CLIENT)" )
471+     assert  regex .match ("(API-CLIENT)" )
472+     assert  not  regex .match ("(TEST)" )
473+     assert  not  regex .match ("(API; CLIENT)" )
474+ 
475+ 
462476def  test_r_delim (conventional_commit ):
463477    regex  =  re .compile (conventional_commit .r_delim )
464478
@@ -565,13 +579,27 @@ def test_is_valid__default_type(conventional_commit, type):
565579    assert  conventional_commit .is_valid (input )
566580
567581
582+ @pytest .mark .parametrize ("type" , ConventionalCommit .DEFAULT_TYPES ) 
583+ def  test_is_valid__default_type_uppercase (conventional_commit , type ):
584+     input  =  f"{ type .upper ()}  : message" 
585+ 
586+     assert  conventional_commit .is_valid (input )
587+ 
588+ 
568589@pytest .mark .parametrize ("type" , ConventionalCommit .CONVENTIONAL_TYPES ) 
569590def  test_is_valid__conventional_type (conventional_commit , type ):
570591    input  =  f"{ type }  : message" 
571592
572593    assert  conventional_commit .is_valid (input )
573594
574595
596+ @pytest .mark .parametrize ("type" , ConventionalCommit .CONVENTIONAL_TYPES ) 
597+ def  test_is_valid__conventional_type_uppercase (conventional_commit , type ):
598+     input  =  f"{ type .upper ()}  : message" 
599+ 
600+     assert  conventional_commit .is_valid (input )
601+ 
602+ 
575603@pytest .mark .parametrize ("type" , CUSTOM_TYPES ) 
576604def  test_is_valid__custom_type (type ):
577605    input  =  f"{ type }  : message" 
@@ -588,6 +616,14 @@ def test_is_valid__conventional_custom_type(type):
588616    assert  conventional_commits .is_valid (input )
589617
590618
619+ @pytest .mark .parametrize ("type" , ConventionalCommit .CONVENTIONAL_TYPES ) 
620+ def  test_is_valid__conventional_custom_type_uppercase (type ):
621+     input  =  f"{ type .upper ()}  : message" 
622+     conventional_commits  =  ConventionalCommit (types = CUSTOM_TYPES )
623+ 
624+     assert  conventional_commits .is_valid (input )
625+ 
626+ 
591627def  test_is_valid__breaking_change (conventional_commit ):
592628    input  =  "fix!: message" 
593629
0 commit comments