inspirehep/beard

general: parametrized tests are not runnable with nosetests

Closed this issue · 6 comments

Not that it is strictly required, but the use of pytest.mark.parametrize makes it not possible to run the corresponding decorated tests with nosetests.

Ideas @MSusik @petros-ioannidis ?

I think that there is no such way to parametrize tests in nose. So the question is whether we should drop support for nose or drop parametrizing?

Well, you can do something similar, by writing a test generator. I am not sure this is supported by py.test though, we should check.

I think there are alternatives for parameterizing in nose so we shouldn't
drop parameterizing since its helpful for tests. I did not search
thoroughly but I think we can write our own test generator that will be
compatible or just use another method for parameterizing.

On Mon, Feb 2, 2015 at 4:31 PM, Gilles Louppe notifications@github.com
wrote:

Well, you can do something similar, by writing a test generator. I am not
sure this is supported by py.test though, we should check.


Reply to this email directly or view it on GitHub
#17 (comment)
.

In nose, this can be done using something similar to https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/tests/test_forest.py#L102

I dont know if such tests are compatible with py.test though. This is something to be checked.

Closing, as Pytest is nowadays the standard