11import sys
2+ from datetime import datetime
23
34import pytest
45
@@ -78,7 +79,6 @@ def test_changelog_from_start(mocker, capsys, changelog_path, file_regression):
7879
7980
8081@pytest .mark .usefixtures ("tmp_commitizen_project" )
81- @pytest .mark .freeze_time ("2022-03-30" )
8282def test_changelog_replacing_unreleased_using_incremental (
8383 mocker , capsys , changelog_path , file_regression
8484):
@@ -103,13 +103,14 @@ def test_changelog_replacing_unreleased_using_incremental(
103103 cli .main ()
104104
105105 with open (changelog_path , "r" ) as f :
106- out = f .read ()
106+ out = f .read ().replace (
107+ datetime .strftime (datetime .now (), "%Y-%m-%d" ), "2022-08-14"
108+ )
107109
108110 file_regression .check (out , extension = ".md" )
109111
110112
111113@pytest .mark .usefixtures ("tmp_commitizen_project" )
112- @pytest .mark .freeze_time ("2022-03-30" )
113114def test_changelog_is_persisted_using_incremental (
114115 mocker , capsys , changelog_path , file_regression
115116):
@@ -139,7 +140,9 @@ def test_changelog_is_persisted_using_incremental(
139140 cli .main ()
140141
141142 with open (changelog_path , "r" ) as f :
142- out = f .read ()
143+ out = f .read ().replace (
144+ datetime .strftime (datetime .now (), "%Y-%m-%d" ), "2022-08-14"
145+ )
143146
144147 file_regression .check (out , extension = ".md" )
145148
0 commit comments