@@ -659,6 +659,37 @@ def test_changelog_from_rev_single_version_not_found(
659
659
assert "Could not find a valid revision" in str (excinfo )
660
660
661
661
662
+ @pytest .mark .usefixtures ("tmp_commitizen_project" )
663
+ @pytest .mark .freeze_time ("2022-02-13" )
664
+ def test_changelog_from_rev_range_default_tag_format (
665
+ mocker , config_path , changelog_path
666
+ ):
667
+ """Checks that rev_range is calculated with the default (None) tag format"""
668
+ # create commit and tag
669
+ create_file_and_commit ("feat: new file" )
670
+ testargs = ["cz" , "bump" , "--yes" ]
671
+ mocker .patch .object (sys , "argv" , testargs )
672
+ cli .main ()
673
+ wait_for_tag ()
674
+
675
+ create_file_and_commit ("feat: after 0.2.0" )
676
+ create_file_and_commit ("feat: another feature" )
677
+
678
+ testargs = ["cz" , "bump" , "--yes" ]
679
+ mocker .patch .object (sys , "argv" , testargs )
680
+ cli .main ()
681
+ wait_for_tag ()
682
+
683
+ testargs = ["cz" , "changelog" , "0.3.0" ]
684
+ mocker .patch .object (sys , "argv" , testargs )
685
+ cli .main ()
686
+
687
+ with open (changelog_path , "r" ) as f :
688
+ out = f .read ()
689
+
690
+ assert "new file" not in out
691
+
692
+
662
693
@pytest .mark .usefixtures ("tmp_commitizen_project" )
663
694
@pytest .mark .freeze_time ("2022-02-13" )
664
695
def test_changelog_from_rev_range_version_not_found (mocker , config_path ):
0 commit comments