-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
Component: TestsIssue/PR that addresses testsIssue/PR that addresses testsgood first issueGood for newcomersGood for newcomershacktoberfestIssues suitable for hacktoberfestIssues suitable for hacktoberfest
Description
The test fixtures in tests/conftest.py lack comprehensive docstrings explaining their purpose, structure, and usage. This makes it harder for new contributors to understand available test utilities when writing tests.
File: tests/conftest.py
Current state:
@pytest.fixture
def test_condition():
# TODO: Tidy up fixtures
return Condition(...) # What does this fixture provide? When should I use it?Goal:
Add clear, comprehensive docstrings to all fixtures explaining:
- What the fixture provides
- When to use it
- Key attributes/structure
- Related fixtures (if any)
Acceptance Criteria:
- All fixtures in
tests/conftest.pyhave docstrings - Docstrings follow Google or NumPy style guide
- Docstrings include:
- One-line summary
- Detailed description (if needed)
- Return value description
- Usage example (optional but encouraged)
- Consider grouping related fixtures with section comments
Example format:
@pytest.fixture
def test_condition():
"""Create a sample FHIR Condition resource for testing.
Provides a basic Condition resource representing hypertension (I10)
with standard test patient reference. Use this fixture when testing
components that process or transform Condition resources.
Returns:
Condition: A FHIR Condition resource with:
- subject: "Patient/123"
- code: I10 (Essential hypertension)
- clinicalStatus: active
See also:
- test_condition_list: Multiple conditions
- test_bundle: Bundle containing condition
"""
return Condition(...)Resources:
- Google Python Style Guide - Docstrings
- Review existing well-documented functions in
healthchain/fhir/helpers.pyfor examples
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: TestsIssue/PR that addresses testsIssue/PR that addresses testsgood first issueGood for newcomersGood for newcomershacktoberfestIssues suitable for hacktoberfestIssues suitable for hacktoberfest
Type
Projects
Status
Done