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 analysis/test_leaflet.py #1551

Merged
merged 2 commits into from Jul 29, 2017

Conversation

Projects
None yet
3 participants
@utkbansal
Member

utkbansal commented Jul 23, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?
lipid_head_string = "name PO4"
def test_leaflet_finder(self, universe, lipid_heads):
from MDAnalysis.analysis.leaflet import LeafletFinder

This comment has been minimized.

@kain88-de

kain88-de Jul 26, 2017

Member

import at the head of the file

del self.universe
del self.lipid_heads
del self.lipid_head_string
class TestLeafletFinder(object):

This comment has been minimized.

@kain88-de

kain88-de Jul 26, 2017

Member

please remove the class

@staticmethod
@pytest.fixture()
def universe():
return MDAnalysis.Universe(Martini_membrane_gro, Martini_membrane_gro)

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017

Contributor

This can be return MDAnalysis.Universe(Martini_membrane_gro)

def lipid_heads(self, universe):
return universe.select_atoms("name PO4")
lipid_head_string = "name PO4"

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017

Contributor

This should be defined at the beginning, and the variable name should be in capital if the class get removed. It should certainly not be defined in the class scope, in between two methods.

def test_leaflet_finder(self):
@pytest.fixture()
def lipid_heads(self, universe):
return universe.select_atoms("name PO4")

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017

Contributor

This could use the lipid_head_string variable.

@utkbansal

This comment has been minimized.

Member

utkbansal commented Jul 27, 2017

@kain88-de @jbarnoud Better now?

@utkbansal utkbansal changed the title from [WIP]Pytest Style analysis/test_leaflet.py to Pytest Style analysis/test_leaflet.py Jul 27, 2017

@utkbansal

This comment has been minimized.

Member

utkbansal commented Jul 29, 2017

@kain88-de @jbarnoud Anything else to do?

@jbarnoud jbarnoud merged commit b4e044b into MDAnalysis:develop Jul 29, 2017

3 checks passed

QuantifiedCode No new issues introduced.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.01%) to 90.412%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment