-
Notifications
You must be signed in to change notification settings - Fork 8
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
added missing test #205
added missing test #205
Conversation
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.
Looks good.
assert dataholder.get("a") == 1 | ||
# 2. key and default | ||
assert dataholder.get("b", 2) == 2 | ||
# 3. key and wrong default | ||
assert dataholder.get("b", 3) == 2 | ||
# 4. empty key - always None | ||
assert dataholder.get("c") is None | ||
# 5. empty key and default | ||
assert dataholder.get("c", "123") == "123" |
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.
Could we have gotten this functionality through inheritance from a build-in class, like default dict?
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.
could, yes, I just didn't wanna inherit from the built-in classes
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.
Lgtm
|
||
ta = new_tracked_array() | ||
ta /= 1.5 | ||
assert ta.modified |
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 would feel better if before the modification it had assert not ta.modified
at least once
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.
That is in the new_tracked_array()
function. At least he sets it to False
in the function.
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.
thank you
assert value is not func() | ||
|
||
|
||
@pytest.mark.parametrize( |
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.
Nice, ...
helper classes didn't have tests. This one adds one for
data.py
. Related to #202