Skip to content

Commit

Permalink
consolidate unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Gulan committed Aug 7, 2024
1 parent cd7667d commit 30c704a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/towncrier/test/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ def test_counter_with_extension(self):
("123", "feature", 1),
)

def test_get_underline_size_ascii(self):
"""Determine underline size for normal ASCII strings."""
assert get_underline_size("bugfixes") == 8

def test_get_underline_size_wide_character(self):
"""Determine underline size for strings with wide characters."""
assert get_underline_size("🐛 Bugfixes") == 11

def test_ignores_extension(self):
"""File extensions are ignored."""
self.assertEqual(
Expand Down Expand Up @@ -208,13 +216,3 @@ def test_ordering(self):
- Added Fish
"""
)


class TestUtilityFunctions(TestCase):
def test_get_underline_size_ascii(self):
"""Determine underline size for normal ASCII strings."""
assert get_underline_size("bugfixes") == 8

def test_get_underline_size_wide_character(self):
"""Determine underline size for strings with wide characters."""
assert get_underline_size("🐛 Bugfixes") == 11

0 comments on commit 30c704a

Please sign in to comment.