add comprehensive docstrings to test fixtures#144
Merged
jenniferjiangkells merged 1 commit intodotimplement:mainfrom Oct 3, 2025
Merged
add comprehensive docstrings to test fixtures#144jenniferjiangkells merged 1 commit intodotimplement:mainfrom
jenniferjiangkells merged 1 commit intodotimplement:mainfrom
Conversation
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Contributor
Author
|
Hi, @jenniferjiangkells Please review!! |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves test maintainability and onboarding by adding clear, Google-style docstrings to all fixtures in
tests/conftest.pyand by hardening a few fixtures to avoid brittle behavior and cross-test side effects. No production code behavior is changed — only test utilities and their documentation.Related issue #137
What I changed
@pytest.fixtureintests/conftest.py, including:Returns:orYields:sectionExample:blocks for complex fixturesPath(__file__).parent / "data" / ....copy.deepcopyintest_allergy_with_reactionandtest_medication_with_dosageto avoid mutating fixtures passed as inputs.doc_ref_without_contentto constructDocumentReferenceContent+Attachment(instead of a plain dict) for FHIR object consistency.config_fixturesyields a temporary config directory and writes representative YAML files used by config-related tests.real_config_dirdefinitions (kept the robust implementation thatpytest.skips when configs are absent).cda_adapterdocstring.Why
Acceptance criteria
Returns/Yields.See Alsoor examples where appropriate.