-
Notifications
You must be signed in to change notification settings - Fork 321
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
Allow getting an uninitialized DelegateParameter with offset or scale #3662
Allow getting an uninitialized DelegateParameter with offset or scale #3662
Conversation
…one; added two tests
@astafan8 I put the tests in test_parameter_scale_offset.py as you asked. A good place would also be test_delegate_parameter.py. As I was scrolling through it, I found that the previous behaviour may actually be intended: What do you think about the other location, and the change of expected behaviour? |
true, but i don't think that matters much. leave this decision up to your preference :)
hmmm..... that's a very good question! glad that we have these tests so that we think about this. However, i think this test is only capturing the current behavior as opposed to making it "desired". I don't think it makes sense that get() and snapshot() rasie a TypeError with the scale/offset set and ready while the underlying parameter's value is None - that's where the original issue is coming from, right? that this behavior does not bring value. we can ask for a third opinion - @jenshnielsen what is your take on this? |
I think its fine to change the test to reflect this new behavior. Just make sure that we document this by adding a changelog fragment |
Codecov Report
@@ Coverage Diff @@
## master #3662 +/- ##
=======================================
Coverage 65.74% 65.74%
=======================================
Files 225 225
Lines 30524 30524
=======================================
Hits 20068 20068
Misses 10456 10456 |
bors merge |
_from_raw_value_to_value
)Fixes #3653