Skip to content

Commit

Permalink
Add some test docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyChris committed Jun 10, 2024
1 parent 836bfb4 commit 66b4617
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/towncrier/test/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ def test_without_filename_no_orphan_config(self, runner: CliRunner):

@with_isolated_runner
def test_sections(self, runner: CliRunner):
"""
When creating a new fragment, the user can specify the section from the command
line (and if non is provided, the default section will be used).
"""
setup_simple_project(
extra_config="""
[[tool.towncrier.section]]
Expand Down Expand Up @@ -456,6 +460,10 @@ def test_sections(self, runner: CliRunner):

@with_isolated_runner
def test_sections_without_filename(self, runner: CliRunner):
"""
When multiple sections exist when the interactive prompt is used, the user is
prompted to select a section.
"""
setup_simple_project(
extra_config="""
[[tool.towncrier.section]]
Expand Down Expand Up @@ -617,8 +625,7 @@ def test_in_different_dir_with_nondefault_newsfragments_directory(self, runner):
Path("pyproject.toml").write_text(
# Important to customize `config.directory` because the default
# already supports this scenario.
"[tool.towncrier]\n"
+ 'directory = "changelog.d"\n'
"[tool.towncrier]\n" + 'directory = "changelog.d"\n'
)
Path("foo/foo").mkdir(parents=True)
Path("foo/foo/__init__.py").write_text("")
Expand Down

0 comments on commit 66b4617

Please sign in to comment.