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
Remove dependency from nose #1574
Conversation
Can you remove nose as well from the Travis config. Then we can see if this really is the last thing that uses nose. |
@kain88-de This is not the last thing that uses nose. I'm currently investigating what is still dependent on nose. Will update as I know more. |
@kain88-de https://github.com/MDAnalysis/mdanalysis/pull/1574/files#diff-416947382aa4e650975916732248fef5R519 is failing. I tried using the debugger and the value of |
The diff you are citing is to big. |
@kain88-de |
Not sure why that would have started working, but it looks like the tests pass now? (Ie it raises the right Error again). This just needs a rebase now |
This is weird indeed. @nestorwendt's recent PR #1566 went over the behavior of those lines (the one in question seems to be the check whether an undefined dihedral returns a nan). |
1fecf1b
to
486f4a8
Compare
@kain88-de @richardjgowers This works on Travis, not on my system. Have tried reinstalling the package and testusite, but the tests still fail. |
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.
Looks good besides of the issue with marking a test when the import doesn't work. Please change all of those tests to use pytest.importorskip
@dec.skipif(module_not_found('sklearn'), | ||
"Test skipped because sklearn is not available.") | ||
@dec.slow | ||
@pytest.mark.skipif(module_not_found('sklearn'), reason="Test skipped because sklearn is not available.") |
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.
correct here is pytest.importorskip
. Note you need to use it inside of the function.
@utkbansal I don't know why the test don't work on your local laptop. It's hard to tell without being in front of the computer. |
def chk_same_position(x_id, y_id, hasval='nan'):
"""Handling nan/inf: check that x and y have the nan/inf at the same
locations."""
try:
assert_array_equal(x_id, y_id)
except AssertionError:
msg = build_err_msg([x, y],
err_msg + '\nx and y %s location mismatch:'
% (hasval), verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
> raise AssertionError(msg)
E AssertionError:
E Arrays are not almost equal to 5 decimals
E Cython dihedrals didn't match numpy calculations
E x and y nan location mismatch:
E x: array([ 0. , 0. , 3.14159, 0.50714])
E y: array([ nan, nan, 3.14159, -0.50714], dtype=float32) |
Are your cython generated files up do date? We recently changed them so maybe you need to compile the cython modules against the current package version you are testing. |
@kain88-de Can we merge this soon? Would save me from a lot of merge conflicts. |
Fixes #
Changes made in this Pull Request:
PR Checklist