Skip to content
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_hbonds.py #1544

Merged
merged 3 commits into from Aug 3, 2017

Conversation

utkbansal
Copy link
Member

Fixes #

Changes made in this Pull Request:

PR Checklist

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

'angle': 150.0,
}

def _run(self, universe, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't a method like this be replaced with a fixture? This would then make it easier to cache this result (if possible) by increasing the scope

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kwargs are a problem to use a fixture here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can see it's only ever called as self._run(universe) so we could remove the kwargs?

@richardjgowers richardjgowers self-assigned this Jul 25, 2017
Copy link
Member

@richardjgowers richardjgowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should replace _run with a fixture, and look to see if we can increase the scope of it

'std': np.std,
}

def _normalize_timeseries(self, h):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should just put this method into the fixture rather than refer to it

@utkbansal utkbansal changed the title [WIP]Pytest Style analysis/test_hbonds.py Pytest Style analysis/test_hbonds.py Jul 29, 2017
@utkbansal
Copy link
Member Author

@kain88-de @richardjgowers What needs to be done here?

@richardjgowers richardjgowers merged commit b6a7cbc into MDAnalysis:develop Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants