Skip to content

test: cover EncounterTransformer non-DataFrame validation branches - #192

Closed
haas26p-ctrl wants to merge 1 commit into
PhilanthroPy-Project:mainfrom
haas26p-ctrl:test/encounter-transformer-validate-branches-152
Closed

test: cover EncounterTransformer non-DataFrame validation branches#192
haas26p-ctrl wants to merge 1 commit into
PhilanthroPy-Project:mainfrom
haas26p-ctrl:test/encounter-transformer-validate-branches-152

Conversation

@haas26p-ctrl

Copy link
Copy Markdown

Summary

Test-only coverage for two unexecuted validation branches in EncounterTransformer:

  • test_encounter_transformer_rejects_non_dataframe_encounter_df — list-of-dicts encounter_df raises TypeError matching must be a pd.DataFrame
  • test_encounter_transformer_validate_x_passes_arrays_throughassert t.fit(np.zeros((2, 3))) is t (array X uses the public fit path; _validate_X early-return)

No source changes under philanthropy/. CHANGELOG + CONTRIBUTORS updated.

Closes #152.

Test plan

  • python -m pytest tests/test_preprocessing.py tests/test_as_of_cutoff.py --cov=philanthropy.preprocessing._encounters --cov-report=term-missing -q
  • make ci / make riskcov

Add tests for TypeError on list encounter_df and for array X passing
through _validate_X via public fit.

Closes PhilanthroPy-Project#152.
@haas26p-ctrl

Copy link
Copy Markdown
Author

Closing this PR — withdrawing the contribution. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: EncounterTransformer's non-DataFrame encounter_df TypeError has no test

1 participant