Skip to content

Commit

Permalink
🧪 Add a test for default fragments dir fallback
Browse files Browse the repository at this point in the history
Closes #83.
  • Loading branch information
webknjaz committed Feb 26, 2025
1 parent 10e80df commit bfae598
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/_fragment_discovery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,16 @@ def test_lookup_towncrier_fragments_missing_dir(tmp_path: Path) -> None:
TOWNCRIER_TOML_FILENAME,
)
assert discovered_fragment_paths == set()


def test_lookup_towncrier_fragments_unset_dir(tmp_path: Path) -> None:
"""Test that implicit fragments folder uses defaults."""
(tmp_path / TOWNCRIER_TOML_FILENAME).write_text(
'[tool.towncrier]',
encoding=UTF8_ENCODING,
)
discovered_fragment_paths = lookup_towncrier_fragments.__wrapped__(
tmp_path,
TOWNCRIER_TOML_FILENAME,
)
assert discovered_fragment_paths == set()

0 comments on commit bfae598

Please sign in to comment.