Skip to content

Commit

Permalink
fix test to parse changelog completly after adding meta data
Browse files Browse the repository at this point in the history
  • Loading branch information
brainelectronics committed Oct 4, 2024
1 parent 730521a commit 8822586
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_extract_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
from pathlib import Path
from sys import stdout
from typing import List
from typing import Dict, List
from unittest.mock import mock_open, patch

from changelog2version.extract_version import (ExtractVersion,
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_parse_changelog_file(self,
(
"changelog_with_meta.md",
["## [1.3.0] - 2022-10-26", "## [1.2.3] - 2022-07-31"],
"### Added\n- Something fixed\n",
"<!-- meta = {'type': 'feature', 'scope': ['all'], 'affected': ['all']} -->\n\n### Added\n- Something fixed\n",
{'type': 'feature', 'scope': ['all'], 'affected': ['all']}
),
)
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_parse_changelog_completely_file(self,
self.assertEqual(self.ev.meta_data, expected_meta_data)
self.assertTrue(all(isinstance(ele, str)
for ele in self.ev.latest_description_lines))
self.assertEqual(len(self.ev.latest_description_lines), 3)
self.assertTrue(len(self.ev.latest_description_lines) in [3, 5])

@params(
# valid semver release version lines
Expand Down

0 comments on commit 8822586

Please sign in to comment.