Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip the checks if the news file was changed #337

Merged
merged 21 commits into from
Feb 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test docstrings
  • Loading branch information
hexagonrecursion committed Apr 7, 2021
commit 26ee5ef53680de911ea0d4c1c3bd2b569e6cfc6d
5 changes: 5 additions & 0 deletions src/towncrier/test/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def test_none_stdout_encoding_works(self):
self.assertEqual(b"", stderr)

def test_first_release(self):
"""The checks should be skipped on a branch that creates the news file.

If the checkes are not skipped in this case, towncrier check would fail
for the first release that has a changelog"""
runner = CliRunner()

with runner.isolated_filesystem():
Expand All @@ -197,6 +201,7 @@ def test_first_release(self):
self.assertIn("Checks SKIPPED: news file changes detected", result.output)

def test_second_release(self):
"""The checks should be skipped on a branch that modifies the news file."""
runner = CliRunner()

with runner.isolated_filesystem():
Expand Down