-
Notifications
You must be signed in to change notification settings - Fork 3
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
Docstrings and expand tests #10
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
thanks for offering to help. test files don't usually have docstrings, tests should be simple and readable. they can have simple comments but if they require extensive comments or docstrings then they need to be simplified which is not the case here.
|
||
|
||
@pytest.mark.parametrize('dimension', _ALL_DIMENSIONS) | ||
def test_arithmetic_ops_preserve_type_multi_array( |
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.
from TypedUnits perspective there is no difference between a 1-D array and a multidimensional, both are a numpy.ndarray so this case is implicitly covered by the tests.
We can consider explicitly testing for this though but for that please improve the test.
|
||
c = a + b | ||
should_all_true = c == u * [[7.0, 10.0], [12.0, 14.0]] | ||
assert should_all_true.all().all() |
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.
a single .all()
is enough
No description provided.