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_nuclinfo.py #1549

Merged
merged 3 commits into from Jul 26, 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?
@staticmethod
@pytest.fixture()
def u():

This comment has been minimized.

@richardjgowers

richardjgowers Jul 25, 2017

Member

can we increase the scope of this fixture?

This comment has been minimized.

@utkbansal

utkbansal Jul 25, 2017

Member

@richardjgowers Increase to what level?

@richardjgowers richardjgowers self-assigned this Jul 25, 2017

@utkbansal

This comment has been minimized.

Member

utkbansal commented Jul 25, 2017

@richardjgowers Done. Dropped the class too.

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

@richardjgowers

Looks good

@jbarnoud

Each method is covered by two tests. Each of these pairs can be grouped in a parametrized test.

def test_minor_pair_2(self):
val = nuclinfo.minor_pair(self.u, 20, 5, seg1='RNAA', seg2='RNAA')
assert_almost_equal(val, 4.356, decimal=3)
def test_minor_pair_1(u):

This comment has been minimized.

@jbarnoud

jbarnoud Jul 26, 2017

Contributor

test_minor_pair_1 and test_minor_pair_2 can be grouped in a parametrized test_minor_pair.

def test_phase_cp_2(self):
val = nuclinfo.phase_cp(self.u, seg='RNAA', i=21)
assert_almost_equal(val, 16.199, decimal=3)
def test_major_pair_1(u):

This comment has been minimized.

@jbarnoud

jbarnoud Jul 26, 2017

Contributor

test_major_pair_* can be grouped in a parametrized test.

@richardjgowers richardjgowers merged commit 53410cd into MDAnalysis:develop Jul 26, 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.413%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment