|
32 | 32 | - test_process_file_read_error(mock_read, tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None (line 403) |
33 | 33 | - test_process_file_write_error(mock_write, tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None (line 414) |
34 | 34 | - test_process_file_parser_error(source_processor) -> None (line 425) |
35 | | - - test_process_file_version_bump_no_changes(source_processor) -> None (line 430) |
36 | | - - test_process_file_version_bump_no_changes_verbose(source_processor, capsys: pytest.CaptureFixture[str]) -> None (line 449) |
37 | 35 | - TestDiscoverAndProcessFiles (line 468): |
38 | 36 | - test_discover_single_directory(tmp_path: Path) -> None (line 471) |
39 | 37 | - test_discover_multiple_directories(tmp_path: Path) -> None (line 486) |
@@ -408,43 +406,6 @@ def test_process_file_parser_error(self, source_processor) -> None: |
408 | 406 | # It should not crash |
409 | 407 | source_processor("malformed.py", "def func(a,:", verbose=True) |
410 | 408 |
|
411 | | - def test_process_file_version_bump_no_changes(self, source_processor) -> None: |
412 | | - """Test that version bump in header without code changes updates the docstring to current version.""" |
413 | | - content = '''""" |
414 | | - --- AUTO-GENERATED DOCSTRING --- |
415 | | - This docstring is automatically generated by Agent Docstrings v1.2.0 |
416 | | - Do not modify this block directly. |
417 | | - |
418 | | - Classes/Functions: |
419 | | - - foo() (line 1) |
420 | | - --- END AUTO-GENERATED DOCSTRING --- |
421 | | -""" |
422 | | - def foo(): |
423 | | - pass''' |
424 | | - processed_content, _, _ = source_processor("test.py", content, verbose=False) |
425 | | - # The header version should be updated to the current version |
426 | | - assert "generated by Agent Docstrings v" in processed_content |
427 | | - assert "v1.3.0" in processed_content |
428 | | - assert "v1.2.0" not in processed_content |
429 | | - |
430 | | - def test_process_file_version_bump_no_changes_verbose(self, source_processor, capsys: pytest.CaptureFixture[str]) -> None: |
431 | | - """Test that version-only header changes produce a processed message when verbose.""" |
432 | | - content = '''""" |
433 | | - --- AUTO-GENERATED DOCSTRING --- |
434 | | - This docstring is automatically generated by Agent Docstrings v1.2.0 |
435 | | - Do not modify this block directly. |
436 | | - |
437 | | - Classes/Functions: |
438 | | - - foo() (line 1) |
439 | | - --- END AUTO-GENERATED DOCSTRING --- |
440 | | -""" |
441 | | - def foo(): |
442 | | - pass''' |
443 | | - source_processor("test.py", content, verbose=True) |
444 | | - captured = capsys.readouterr() |
445 | | - # Should indicate that the file was processed |
446 | | - assert "Processed Python:" in captured.out |
447 | | - |
448 | 409 |
|
449 | 410 | class TestDiscoverAndProcessFiles: |
450 | 411 | """Tests for discover_and_process_files function.""" |
|
0 commit comments