Skip to content

Commit c4cc262

Browse files
gpsheadclaude
andcommitted
Remove redundant test spam - we don't need it\! 🥓
Eliminated 4 redundant test methods from TestAddCommandAutomation that duplicated validation logic already covered by existing parametrized tests. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f49b7fb commit c4cc262

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

tests/test_blurb_add.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -289,26 +289,6 @@ def mock_chdir(self):
289289
with mock.patch.object(blurb, 'chdir_to_repo_root') as m:
290290
yield m
291291

292-
def test_invalid_section_parameter(self, mock_chdir, capsys):
293-
"""Test that invalid section names are rejected."""
294-
with pytest.raises(SystemExit) as exc_info:
295-
blurb.add(section="InvalidSection")
296-
297-
# error() function exits with string message, not code
298-
assert "Invalid section name: 'InvalidSection'" in str(exc_info.value)
299-
300-
def test_invalid_gh_issue_number(self, mock_chdir, capsys):
301-
"""Test that invalid GitHub issue numbers are rejected."""
302-
# Test issue number below threshold
303-
with pytest.raises(SystemExit) as exc_info:
304-
blurb.add(issue="123")
305-
assert "Invalid issue number: 123" in str(exc_info.value)
306-
307-
# Test invalid formats
308-
with pytest.raises(SystemExit) as exc_info:
309-
blurb.add(issue="not-a-number")
310-
assert "Invalid GitHub issue: not-a-number" in str(exc_info.value)
311-
312292
def test_rst_on_stdin_requires_other_params(self, mock_chdir, capsys):
313293
"""Test that --rst-on-stdin requires --issue and --section."""
314294
with pytest.raises(SystemExit) as exc_info:
@@ -317,22 +297,6 @@ def test_rst_on_stdin_requires_other_params(self, mock_chdir, capsys):
317297
# error() function exits with string message, not code
318298
assert "--issue and --section required with --rst-on-stdin" in str(exc_info.value)
319299

320-
def test_rst_on_stdin_missing_section(self, mock_chdir, capsys):
321-
"""Test that --rst-on-stdin fails without --section."""
322-
with pytest.raises(SystemExit) as exc_info:
323-
blurb.add(rst_on_stdin=True, issue="123456")
324-
325-
# error() function exits with string message, not code
326-
assert "--issue and --section required with --rst-on-stdin" in str(exc_info.value)
327-
328-
def test_rst_on_stdin_missing_issue(self, mock_chdir, capsys):
329-
"""Test that --rst-on-stdin fails without --issue."""
330-
with pytest.raises(SystemExit) as exc_info:
331-
blurb.add(rst_on_stdin=True, section="Library")
332-
333-
# error() function exits with string message, not code
334-
assert "--issue and --section required with --rst-on-stdin" in str(exc_info.value)
335-
336300
def test_add_with_all_automation_params(self, tmp_path):
337301
"""Test successful add with all automation parameters."""
338302
# Set up filesystem

0 commit comments

Comments
 (0)