|
31 | 31 |
|
32 | 32 |
|
33 | 33 | @pytest.fixture |
34 | | -def changelog_jinja_file(tmp_project_root: Path) -> Path: |
35 | | - return tmp_project_root / "changelog.jinja" |
| 34 | +def changelog_jinja_file(tmp_commitizen_project: Path) -> Path: |
| 35 | + return tmp_commitizen_project / "changelog.jinja" |
36 | 36 |
|
37 | 37 |
|
38 | 38 | @pytest.fixture |
39 | 39 | def changelog_tpl( |
40 | | - tmp_project_root: Path, any_changelog_format: ChangelogFormat |
| 40 | + tmp_commitizen_project: Path, any_changelog_format: ChangelogFormat |
41 | 41 | ) -> Path: |
42 | | - return tmp_project_root / any_changelog_format.template |
| 42 | + return tmp_commitizen_project / any_changelog_format.template |
43 | 43 |
|
44 | 44 |
|
45 | 45 | @pytest.fixture |
46 | 46 | def changelog_file( |
47 | | - tmp_project_root: Path, any_changelog_format: ChangelogFormat |
| 47 | + tmp_commitizen_project: Path, any_changelog_format: ChangelogFormat |
48 | 48 | ) -> Path: |
49 | | - return tmp_project_root / any_changelog_format.default_changelog_file |
| 49 | + return tmp_commitizen_project / any_changelog_format.default_changelog_file |
50 | 50 |
|
51 | 51 |
|
52 | 52 | @pytest.mark.usefixtures("tmp_commitizen_project") |
@@ -437,7 +437,7 @@ def test_changelog_incremental_newline_separates_new_content_from_old( |
437 | 437 |
|
438 | 438 |
|
439 | 439 | def test_changelog_without_revision(tmp_commitizen_project, util: UtilFixture): |
440 | | - tmp_commitizen_project.join("CHANGELOG.md").write( |
| 440 | + (tmp_commitizen_project / "CHANGELOG.md").write_text( |
441 | 441 | """ |
442 | 442 | # Unreleased |
443 | 443 |
|
@@ -1266,7 +1266,7 @@ def test_changelog_template_option_precedence( |
1266 | 1266 | changelog_file: Path, |
1267 | 1267 | changelog_tpl: Path, |
1268 | 1268 | ): |
1269 | | - project_root = Path(tmp_commitizen_project) |
| 1269 | + project_root = tmp_commitizen_project |
1270 | 1270 | cfg_template = project_root / "changelog.cfg" |
1271 | 1271 | cmd_template = project_root / "changelog.cmd" |
1272 | 1272 |
|
@@ -1655,7 +1655,7 @@ def test_changelog_template_incremental_variable( |
1655 | 1655 | Test that the changelog template is not rendered when the incremental flag is not set. |
1656 | 1656 | Reference: https://github.com/commitizen-tools/commitizen/discussions/1620 |
1657 | 1657 | """ |
1658 | | - project_root = Path(tmp_commitizen_project) |
| 1658 | + project_root = tmp_commitizen_project |
1659 | 1659 | changelog_tpl = project_root / any_changelog_format.template |
1660 | 1660 | changelog_tpl.write_text( |
1661 | 1661 | dedent(""" |
|
0 commit comments