[Review Needed]Pytest Style analysis/test_waterdynamics.py #1571
Conversation
SELECTION2, | ||
0, 5, 3) | ||
hbl.run(verbose=False) | ||
assert round(hbl.timeseries[2][1], 5) == 0.75 |
jbarnoud
Jul 30, 2017
Contributor
assert_almost_equal
?
assert_almost_equal
?
jbarnoud
Jul 30, 2017
Contributor
It looks like the test tries to compare hbl.timeseries[2][1]
to 0.75 but has precision issues. This is what assert_almost equal
is for.
It looks like the test tries to compare hbl.timeseries[2][1]
to 0.75 but has precision issues. This is what assert_almost equal
is for.
utkbansal
Jul 30, 2017
Author
Member
Ok.
Ok.
sp_zero.run(verbose=False) | ||
assert_equal(sp_zero.timeseries[1], 0.0) | ||
SELECTION1 = "byres name OH2" | ||
SELECTION2 = SELECTION1 |
jbarnoud
Jul 30, 2017
Contributor
I do not see a reason to have the SELECTION2
constant. SELECTION1
can be used instead just as well.
I do not see a reason to have the SELECTION2
constant. SELECTION1
can be used instead just as well.
msd_zero = MDAnalysis.analysis.waterdynamics.MeanSquareDisplacement( | ||
universe, | ||
SELECTION2, 0, 10, 2) | ||
msd_zero.run(verbose=False) |
kain88-de
Jul 30, 2017
Member
adding the verbose=False
is not necessary. That already is the default.
adding the verbose=False
is not necessary. That already is the default.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixes #
Changes made in this Pull Request:
PR Checklist