[Review Needed]Pytest Style core/test_atomselections.py #1634
Conversation
class TestSelectionsCHARMM(TestCase): | ||
def setUp(self): | ||
class TestSelectionsCHARMM(object): | ||
@pytest.fixture() |
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
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
utkbansal
Aug 21, 2017
Author
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.
@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.
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.
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.
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