-
Notifications
You must be signed in to change notification settings - Fork 75
Use mock sample in tests #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #489 +/- ##
==========================================
- Coverage 94.40% 94.33% -0.08%
==========================================
Files 29 29
Lines 2075 2083 +8
==========================================
+ Hits 1959 1965 +6
- Misses 116 118 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
66s -> 16s test suite runs. nice |
Doing for doctest would be greater reduction of time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool - thanks for the contribution.
On my local machine...
make test
runs in 24 seconds (down from 50 seconds on main) ✅make doctest
speed is unchanged❓
I guess I just have some questions to make sure I understand this
mock_sample_for_doctest
kind of looks transparent in that we're overridingpm.sample
withpymc.testing.mock_sample
. Though that's not working or doing much?mock_pymc_sample
is provided as an input to tests (liketest_did
for example) but it's never used anywhere in those test functions. So this is a bit confusing. Does this make the use ofsample_kwargs
irrelevant now?
Noticing that too. Weird thing is |
Saving about 50s in the test suite by mocking
pm.sample
📚 Documentation preview 📚: https://causalpy--489.org.readthedocs.build/en/489/