[Review Needed]Pytest Style core/test_atomselections.py#1634
[Review Needed]Pytest Style core/test_atomselections.py#1634richardjgowers merged 2 commits intoMDAnalysis:developfrom
Conversation
| class TestSelectionsCHARMM(TestCase): | ||
| def setUp(self): | ||
| class TestSelectionsCHARMM(object): | ||
| @pytest.fixture() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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.
Fixes #
Changes made in this Pull Request:
PR Checklist