-
Notifications
You must be signed in to change notification settings - Fork 180
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
test(api): liquid class delay properties enable strict bool and tests #17722
base: edge
Are you sure you want to change the base?
Conversation
* edge: feat(robot-server): Allow storing and retrieving location-nonspecific ("default") offsets (#17704) refactor(step-generation): split up movableTrashCommandsUtil() into separate functions (#17694) refactor(api): opentrons driver error handling (#17689) fix(api, shared-data): Pick up tc lid directly off deck slot fix (#17683) fix(step-generation): make prevRobotState required in movableTrashCommandsUtil (#17705) refactor(protocol-designer): account for 96-channel load_instrument syntax & pythonName (#17691) chore(components): add a new foldere Helix to Storybook (#17699) fix(protocol-designer, shared-data): update command schema to v10 (#17550) Revert "feat(step-generation): introduce airGapInPlace command (#17357)" Revert "fix(step-generation): properly update robotState when dispense is after airGap (#17392)"
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #17722 +/- ##
==========================================
+ Coverage 21.84% 23.72% +1.88%
==========================================
Files 2822 2835 +13
Lines 217431 218395 +964
Branches 8214 9191 +977
==========================================
+ Hits 47491 51815 +4324
+ Misses 169940 166574 -3366
- Partials 0 6 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
# -------------------------------------------------------------------------------------- | ||
# Strategies | ||
# -------------------------------------------------------------------------------------- | ||
|
||
invalid_values = st.one_of( | ||
st.text(min_size=0, max_size=5), | ||
st.dictionaries(keys=st.text(), values=st.integers()), | ||
st.lists(st.integers(min_value=-100, max_value=100), min_size=1, max_size=5), | ||
st.tuples(st.booleans()), | ||
st.binary(min_size=1, max_size=5), | ||
) | ||
|
||
boolean_looking_values = st.one_of( | ||
st.just("True"), | ||
st.just("1"), | ||
st.just(1), | ||
st.just("False"), | ||
st.just("0"), | ||
st.just(0), | ||
) | ||
|
||
reasonable_floats = st.floats( | ||
min_value=-1000, max_value=1000, allow_infinity=False, allow_nan=False | ||
) | ||
reasonable_ints = st.integers(min_value=-1000, max_value=1000) | ||
|
||
negative_or_zero_floats = st.floats( | ||
min_value=-1000, max_value=0, allow_infinity=False, allow_nan=False | ||
) | ||
negative_or_zero_ints = st.integers(min_value=-1000, max_value=0) | ||
negative_or_zero_floats_and_ints = st.one_of( | ||
negative_or_zero_floats, negative_or_zero_ints | ||
) | ||
positive_or_zero_ints = st.integers(min_value=0, max_value=1000) | ||
positive_or_zero_floats = st.floats( | ||
min_value=0, max_value=1000, allow_infinity=False, allow_nan=False | ||
) | ||
positive_or_zero_floats_or_ints = st.one_of( | ||
positive_or_zero_floats, positive_or_zero_ints | ||
) | ||
|
||
negative_non_zero_floats = st.floats( | ||
min_value=-1000, max_value=-0.0001, allow_infinity=False, allow_nan=False | ||
) | ||
negative_non_zero_ints = st.integers(min_value=-1000, max_value=-1) | ||
negative_non_zero_floats_and_ints = st.one_of( | ||
negative_non_zero_floats, negative_non_zero_ints | ||
) | ||
|
||
positive_non_zero_floats = st.floats( | ||
min_value=0.0001, max_value=1000, allow_infinity=False, allow_nan=False | ||
) | ||
positive_non_zero_ints = st.integers(min_value=1, max_value=1000) | ||
positive_non_zero_floats_and_ints = st.one_of( | ||
positive_non_zero_floats, positive_non_zero_ints | ||
) |
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.
I will move these into a fixture in the next pull request.
Overview
Add unit tests for the builder and setters on
DelayProperties
Review Requests
Does the change to
StrictBool
make sense?Does this raise code coverage at all?
Risk assessment
Low, mostly tests but a small change to the Model for Delay Properties to be StrictBool