-
Notifications
You must be signed in to change notification settings - Fork 663
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_base.py #1547
Conversation
|
||
def tearDown(self): | ||
del self.u | ||
class TestAnalysisBase(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to have this as a class actually
def test_default(self, u): | ||
an = FrameAnalysis(u.trajectory).run() | ||
assert an.n_frames == len(u.trajectory) | ||
assert_equal(an.frames, list(range(len(u.trajectory)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_array_equal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also change for similar cases in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See discussion on #1444.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kain88-de my understanding is that assert_equal
is preferred over assert_array_equal
as discussed in 1444?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@utkbansal It is my understanding too.
step=step).run() | ||
ana3 = base.AnalysisFromFunction(simple_function, u.trajectory, u.atoms, | ||
step=step).run() | ||
ana1 = base.AnalysisFromFunction(simple_function, mobile=u.atoms, step=step).run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't change this formatting. I'm sure this was done to conform to the 80 char limit of pep8
coverage decreased |
@kain88-de Can't figure the drop in coverage, restarting the build. |
@kain88-de @jbarnoud @richardjgowers There is something fishy about the coverage. I have the same 4 lines losing coverage in #1541 too. |
@utkbansal which 4 lines? |
@richardjgowers 2 lines in I have seen the 2 lines in |
@richardjgowers @kain88-de What should I do about the drop? |
Fixes #
Changes made in this Pull Request:
PR Checklist