-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use pytest for test_units
#681
Conversation
Refactor _Unit class to use dunders better
MDANSE/Src/MDANSE/Framework/Units.py
Outdated
"""Ceil of a _Unit value in canonical units. | ||
|
||
>>> print(measure(10.2, 'm/s').ceiling()) | ||
10.0000 m / s |
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 know that these docstrings were already written like this before you made changes, but I think that the examples given here are wrong.
The docstrings below for __floor__
and __round__
should be checked too.
Overall, I would expect 3.6 m/s to be 12.96 km/h, and the ceil, round, floor to give 13, 13 and 12, respectively.
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.
Reworked the docstrings throughout and made sure it was valid under doctest.
a71db07
to
c389fde
Compare
c389fde
to
2590a38
Compare
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 have not found any problems. Looks good.
Description of work
Equivalences
dict withdefaultdict
Fixes
N/A
To test
Standard tests