Skip to content

Commit ab80fc1

Browse files
committed
Fix variable name & value as drifted from existing implementation
1 parent d12c2a5 commit ab80fc1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

exasol/toolbox/util/release/changelog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self, changes_path: Path, version: Version) -> None:
1414
self.version = version
1515
self.unreleased_md: Path = changes_path / "unreleased.md"
1616
self.versioned_changelog_md: Path = changes_path / f"changes_{version}.md"
17-
self.changes_md: Path = changes_path / "changes.md"
17+
self.changelog_md: Path = changes_path / "changelog.md"
1818

1919
def _create_new_unreleased(self):
2020
"""
@@ -56,7 +56,7 @@ def _update_changelog_table_of_contents(self) -> None:
5656
before writing out to again.
5757
"""
5858
updated_content = []
59-
with self.changes_md.open(mode="r", encoding="utf-8") as f:
59+
with self.changelog_md.open(mode="r", encoding="utf-8") as f:
6060
for line in f:
6161
updated_content.append(line)
6262
if line.startswith("* [unreleased]"):
@@ -67,10 +67,10 @@ def _update_changelog_table_of_contents(self) -> None:
6767
updated_content.append(f"changes_{self.version}\n")
6868
updated_content_str = "".join(updated_content)
6969

70-
self.changes_md.write_text(updated_content_str)
70+
self.changelog_md.write_text(updated_content_str)
7171

7272
def get_changed_files(self) -> list[Path]:
73-
return [self.unreleased_md, self.versioned_changelog_md, self.changes_md]
73+
return [self.unreleased_md, self.versioned_changelog_md, self.changelog_md]
7474

7575
def update_changelogs_for_release(self) -> None:
7676
"""

test/unit/util/release/changelog_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def changes_md(tmp_path, changelogs):
6363
"""
6464
As some operations in Changelogs modify files, we need a reset per function
6565
"""
66-
changelogs.changes_md.write_text(CHANGES_CONTENTS)
66+
changelogs.changelog_md.write_text(CHANGES_CONTENTS)
6767

6868

6969
@pytest.fixture
@@ -107,14 +107,14 @@ def test_extract_unreleased_notes(changelogs, unreleased_md):
107107
def test_update_changelog_table_of_contents(changelogs, changes_md):
108108
changelogs._update_changelog_table_of_contents()
109109

110-
assert changelogs.changes_md.read_text() == ALTERED_CHANGES_CONTENTS
110+
assert changelogs.changelog_md.read_text() == ALTERED_CHANGES_CONTENTS
111111

112112
@staticmethod
113113
def test_update_changelogs_for_release(changelogs, unreleased_md, changes_md):
114114
changelogs.update_changelogs_for_release()
115115

116116
# changes.md
117-
assert changelogs.changes_md.read_text() == ALTERED_CHANGES_CONTENTS
117+
assert changelogs.changelog_md.read_text() == ALTERED_CHANGES_CONTENTS
118118
# unreleased.md
119119
assert changelogs.unreleased_md.read_text() == UNRELEASED_TEXT
120120
# versioned.md

0 commit comments

Comments
 (0)