1+ import os
12import re
23from dataclasses import dataclass
34from pathlib import Path
4- from unittest .mock import Mock
55from typing import Any , Optional
6+ from unittest .mock import Mock
67
78import pytest
89from jinja2 import FileSystemLoader
@@ -1638,7 +1639,7 @@ def test_tags_rules_get_version_tags(capsys: pytest.CaptureFixture):
16381639
16391640def test_changelog_file_name_from_args_and_config ():
16401641 mock_config = Mock (spec = BaseConfig )
1641- mock_config .path .parent = "/my/project/ "
1642+ mock_config .path .parent = "/my/project"
16421643 mock_config .settings = {
16431644 "name" : "cz_conventional_commits" ,
16441645 "changelog_file" : "CHANGELOG.md" ,
@@ -1658,8 +1659,12 @@ def test_changelog_file_name_from_args_and_config():
16581659 "unreleased_version" : "1.0.1" ,
16591660 }
16601661 changelog = Changelog (mock_config , args )
1661- assert changelog .file_name == "/my/project/CUSTOM.md"
1662+ assert os .path .normpath (changelog .file_name ) == os .path .normpath (
1663+ os .path .join ("/my/project" , "CUSTOM.md" )
1664+ )
16621665
16631666 args = {"incremental" : None , "dry_run" : False , "unreleased_version" : "1.0.1" }
16641667 changelog = Changelog (mock_config , args )
1665- assert changelog .file_name == "/my/project/CHANGELOG.md"
1668+ assert os .path .normpath (changelog .file_name ) == os .path .normpath (
1669+ os .path .join ("/my/project" , "CHANGELOG.md" )
1670+ )
0 commit comments