-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
sklearn/ball_tree.so has no package name #342
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
Comments
I've submitted a bug report to nose, but I still think it would be wise to move the doctests. I'm happy to do it (I think it would be easy enough), but I'd like to get opinions, particularly if others are getting same error, first. |
I don't know. I still think that those doctests serve as good usage examples and removing them from the docstring is a bit annoying. Wouldn't it be possible to hack sklearn.test to skip the pyx files? |
That is another option. Can the doctests be edited so that they look like code, but aren't picked up by nose? That would be more explicit than adding exceptions to .test |
+1 on somehow keeping these as examples. I think it might be as simple as adding |
I think you have to put this on each line... but I would be glad to be proved wrong. |
Had to comment them out for the release (56a0392) but this still needs to be fixed. |
Stackoverflow has also something to say on this issue: |
On 17 December 2011 04:50, Andreas Mueller <
Ugh, that isn't a good solution (but it seems to be the best we have). Public key at: http://pgp.mit.edu/ Search for this email address and select |
Err... which one? The one defining a function and not calling it seems to be the best to me. |
I meant the per line option. The function is a decent workaround
|
Closing for the moment. I guess we have to wait for nose to really fix this. |
tl;dr nose doesn't give a package name for .pyx files, so ball_tree.so fails when printing out results of doctests. Recommend moving doctests to specific test module instead.
Long version
When running the tests with
from sklearn import test; test(verbose=3)
, the test run great, but when printing out the results, I get an error on this line innose/plugins/doctests.py
:If I
print pk, filename
just above the second if statement, I find out the error happens when dealing with printing out the doctest error fornose/plugins/doctests.py
:None /usr/local/lib/python2.7/dist-packages/scikit_learn-0.9_git-py2.7-linux-i686.egg/sklearn/ball_tree.so
So the error is basically, that ball_tree.so has doctests, but no package name. This is because on line 273 in
nose/util.py
, there is a line:In other words, if its not a .py file, it won't have a package name. I checked the latest source for nose, and this is still there, so my version of nose is not out of date.
If nobody else is getting these, its probably because these tests fail on my computer, and hence nose needs to print out the details. However showing failed tests is important, so these should probably be moved to a specific test module so that they do print out when they fail.
thoughts?
The text was updated successfully, but these errors were encountered: