Skip to content

Commit f0f0fbd

Browse files
committed
fix: update docstring versioning in tests
### Changed - Updated the test for existing auto docstring replacement to dynamically check the version of Agent Docstrings using the `__version__` variable instead of a hardcoded string.
1 parent b9c1bc3 commit f0f0fbd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_docstring_duplication.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import pytest
1313
import re
1414
from textwrap import dedent
15+
from agent_docstrings import __version__
1516

1617
def test_no_docstring_duplication_on_repeated_runs(source_processor) -> None:
1718
"""
@@ -131,7 +132,7 @@ def new_function():
131132
auto_markers = result_content.count("--- AUTO-GENERATED DOCSTRING ---")
132133
assert auto_markers == 1, f"Expected 1 auto docstring marker, found {auto_markers}"
133134
# * Verify the version is updated in the docstring
134-
assert "Agent Docstrings v1.3.2" in docstring_text
135+
assert f"Agent Docstrings v{__version__}" in docstring_text
135136
# * Verify that old_function is mentioned only once *within the docstring*
136137
assert docstring_text.count("old_function()") == 1, "Function should appear only once in docstring"
137138
assert docstring_text.count("new_function()") == 1, "Function should appear only once in docstring"

0 commit comments

Comments
 (0)