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_lineardensity.py #1548

Merged
merged 6 commits into from Aug 5, 2017

Conversation

@utkbansal
Copy link
Member

@utkbansal utkbansal commented Jul 23, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?
utkbansal added 2 commits Jul 23, 2017
ld = LinearDensity(self.selection, binsize=5).run()
assert_allclose(self.xpos, ld.results['x']['pos'], rtol=1e-6, atol=0)

# TODO: Remove this?!

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017
Contributor

What happens if you activate the test?

This comment has been minimized.

@utkbansal

utkbansal Jul 27, 2017
Author Member

@jbarnoud It fails. LinearDensity doesn't have a parameter universe and ld.run() doesn't take any parameters.

This comment has been minimized.

@jbarnoud

jbarnoud Jul 27, 2017
Contributor

I think it can be removed then.

This comment has been minimized.

@kain88-de

kain88-de Jul 29, 2017
Member

This can still be fixed @utkbansal

@utkbansal
Copy link
Member Author

@utkbansal utkbansal commented Jul 28, 2017

@richardjgowers @kain88-de @jbarnoud I need help with coverage! The drop doesn't make sense to me. This file has one and only one function, I don't see what changed. Interesting to note that before I dropped the class, the coverage remained the same. The coverage dropped in the last commit where all I did was drop the class.

@kain88-de
Copy link
Member

@kain88-de kain88-de commented Jul 28, 2017

@utkbansal are you able to point to the line that is not covered anymore?

@kain88-de
Copy link
Member

@kain88-de kain88-de commented Jul 29, 2017

weird. Looks like we introduced more randomness in our testsuite.

@utkbansal
Copy link
Member Author

@utkbansal utkbansal commented Jul 29, 2017

@kain88-de @richardjgowers What should I do to fix this?

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

@orbeckst orbeckst left a comment

I don't think that the minute change in coverage should hold up this PR. LGTM.


# TODO: Remove this?!

This comment has been minimized.

@kain88-de

kain88-de Aug 2, 2017
Member

We said this can be removed.

xpos = np.array([0., 0., 0., 0.0072334, 0.00473299, 0.,
0., 0., 0., 0.])
ld = LinearDensity(selection, binsize=5).run()
assert_allclose(xpos, ld.results['x']['pos'], rtol=1e-6, atol=0)

This comment has been minimized.

@kain88-de

kain88-de Aug 3, 2017
Member

please us e assert_almost equal like everywhere else

This comment has been minimized.

@utkbansal

utkbansal Aug 3, 2017
Author Member

The precision would be 6, right? assert_almost_equal(xpos, ld.results['x']['pos'], 6)

This comment has been minimized.

@kain88-de

kain88-de Aug 3, 2017
Member

Try using the default precision and see if you need to reduce it.

utkbansal added 2 commits Aug 3, 2017
@kain88-de kain88-de merged commit 1f69ba0 into MDAnalysis:develop Aug 5, 2017
1 check passed
1 check passed
coverage/coveralls Coverage increased (+0.01%) to 90.436%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants