Fix garbled error message for invalid importance sampling method#332
Closed
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
Closed
Fix garbled error message for invalid importance sampling method#332ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
Conversation
assert_importance_sampling_method_is_implemented() was passing the function object implemented_is_methods to paste0() instead of calling it with (). This caused the error message to print the function body rather than listing the valid methods. Also add a test to verify the error message content.
Member
|
Wasn't this already part of your PR #326 that was merged? |
Contributor
Author
oh yeah right, i was wondering the same thing. i could soo remember solving this, my bad, version differences. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #332 +/- ##
==========================================
+ Coverage 92.78% 92.98% +0.20%
==========================================
Files 31 31
Lines 2992 2992
==========================================
+ Hits 2776 2782 +6
+ Misses 216 210 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
No problem! |
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.
Fixes #331
assert_importance_sampling_method_is_implemented()was referencing the function objectimplemented_is_methodsrather than calling it with(). This meant the error message for an invalid IS method would print the function body instead of the actual method names.Before
After
Added a test to verify the error message lists the valid methods.