Skip to content

Make the sensitivity defaults test independent of test order - #448

Open
soodoku wants to merge 1 commit into
DoubleML:mainfrom
finite-sample:fix/sensitivity-test-isolation
Open

soodoku wants to merge 1 commit into
DoubleML:mainfrom
finite-sample:fix/sensitivity-test-isolation

Conversation

@soodoku

@soodoku soodoku commented Nov 2, 2026

Copy link
Copy Markdown

test_sensitivity_defaults fails when run alone or on a different pytest worker from test_plr_defaults: it calls sensitivity analysis on a module-global PLR model that only the earlier test fits.

Create and fit a local model inside the sensitivity test. The default-parameter assertions stay unchanged, and the shared model used by test_plr_defaults is not mutated.

Validation: the sensitivity test fails before the change; sensitivity followed by PLR defaults passes after it (2 passed), confirming that neither test needs to run first. Independent automated review confirmed the fix. Formatting and lint checks pass.

Discovered during complete-suite validation of #445, which includes this commit so the integration can be validated independently of test ordering. This test-only repair can be merged separately first.

This branch has not been deployed

No deployments
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.

1 participant