Skip to content
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

Pytest Style: core/test_atom.py #1535

Merged
merged 3 commits into from Jul 25, 2017
Merged

Conversation

@utkbansal
Copy link
Member

@utkbansal utkbansal commented Jul 20, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?
assert atom.charge == 6

def test_attributes_positions(self, atom):
a = atom
# new position property (mutable)
assert_almost_equal(a.position, self.known_pos)

This comment has been minimized.

@richardjgowers

richardjgowers Jul 20, 2017
Member

known_pos is used once within the class, it can just live in this method

This comment has been minimized.

@utkbansal

utkbansal Jul 20, 2017
Author Member

done

Copy link
Contributor

@jbarnoud jbarnoud left a comment

Very little to change.

def lookup_velo():
return self.atom.velocity
return atom.velocity

This comment has been minimized.

@jbarnoud

jbarnoud Jul 20, 2017
Contributor

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

This comment has been minimized.

@jbarnoud

jbarnoud Jul 20, 2017
Contributor

You do not need the nested function here.

@utkbansal
Copy link
Member Author

@utkbansal utkbansal commented Jul 22, 2017

@jbarnoud @richardjgowers Good to go now?

@kain88-de
Copy link
Member

@kain88-de kain88-de commented Jul 25, 2017

@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.

@utkbansal
Copy link
Member Author

@utkbansal utkbansal commented Jul 25, 2017

@kain88-de 0.01% Coveralls shows nothing.

@richardjgowers richardjgowers merged commit d97da42 into MDAnalysis:develop Jul 25, 2017
3 checks passed
3 checks passed
QuantifiedCode 17 minor issues introduced.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.01%) to 90.413%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants