Pytest Style: core/test_atom.py #1535
Merged
Conversation
assert atom.charge == 6 | ||
|
||
def test_attributes_positions(self, atom): | ||
a = atom | ||
# new position property (mutable) | ||
assert_almost_equal(a.position, self.known_pos) |
richardjgowers
Jul 20, 2017
Member
known_pos
is used once within the class, it can just live in this method
known_pos
is used once within the class, it can just live in this method
utkbansal
Jul 20, 2017
Author
Member
done
done
Very little to change. |
def lookup_velo(): | ||
return self.atom.velocity | ||
return atom.velocity |
jbarnoud
Jul 20, 2017
Contributor
Since you are using the context manager to test the exception, you do not need the nested function.
Since you are using the context manager to test the exception, you do not need the nested function.
def bad_add(): | ||
return self.atom + 1 | ||
return atom + 1 |
jbarnoud
Jul 20, 2017
Contributor
You do not need the nested function here.
You do not need the nested function here.
@jbarnoud @richardjgowers Good to go now? |
@utkbansal I've restarted the travis build. I'm curious why there is a drop of 0.03 percent in coverage. Maybe it goes away after rerunning the test but it would be nice if you could have a look into this. |
@kain88-de 0.01% Coveralls shows nothing. |
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