Closed mortonjt closed 8 years ago
It is documented: http://nose.readthedocs.io/en/latest/writing_tests.html#writing-tests
You can use the @nottest
decorator to mark it as not being a test, if you want to keep the old name:
from nose.tools import *
@nottest
def fisher_mean_test(table, grouping, permutations=1000, random_state=None):
# ...
Thanks!
On Tue, Jun 21, 2016 at 12:21 PM, John Szakmeister <notifications@github.com
wrote:
It is documented: http://nose.readthedocs.io/en/latest/writing_tests.html#writing-tests
You can use the @nottest decorator to mark it as not being a test, if you want to keep the old name:
from nose.tools import * @nottestdef fisher_mean_test(table, grouping, permutations=1000, random_state=None):
...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nose-devs/nose/issues/1003#issuecomment-227544072, or mute the thread https://github.com/notifications/unsubscribe/AD_a3Y4UyYtUcKvPV_axVcMJOOc1TlFRks5qODnKgaJpZM4I7DaE .
@mortonjt @jszakmeister you saved my life!!
I have written up a bunch of tests. The tests pass just fine if I run the following
Now if I were to run nosetests as follows
I get the following error
Now the function that I'm trying to test is under
permutation.py
, the function signature+docstring is as followsIt took me a few hours to realize that nosetest was treating this function as a unittest, and was trying to execute it. Just because the word
test
is inside the function name. The nosetests worked when I renamed the function thefisher_mean
I'm not sure what the best way around this problem is, but it took a while to hunt down this problem and it would be nice to at least document this issue.