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

[Review Needed]Pytest Style core/test_atomselections.py #1634

Merged
merged 2 commits into from Aug 25, 2017

Conversation

Projects
None yet
2 participants
@utkbansal
Member

utkbansal commented Aug 20, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@richardjgowers richardjgowers self-assigned this Aug 21, 2017

class TestSelectionsCHARMM(TestCase):
def setUp(self):
class TestSelectionsCHARMM(object):
@pytest.fixture()

This comment has been minimized.

@richardjgowers

richardjgowers Aug 21, 2017

Member

can we increase the scope of this? You'll need to check if any test methods modify the universe in their test. If so, they'l need a function scoped version of the same Universe

This comment has been minimized.

@utkbansal

utkbansal Aug 21, 2017

Member

@richardjgowers Not sure what you meant by they'l need a function scoped version of the same Universe. Have pushed a commit, please have a look if this is what you meant.

This comment has been minimized.

@richardjgowers

richardjgowers Aug 22, 2017

Member

If a test method modifies a class scoped fixture, the fixture will remain modified across all other test methods. So if we want to increase the scope of this fixture, we need to check to see if any methods will modify it. If any test methods do need to modify the fixture, they should use a different version of the fixture which is scoped to only the function.

@richardjgowers richardjgowers merged commit b997234 into MDAnalysis:develop Aug 25, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 90.603%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment