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

Consider creating 'Parameterized tests' #38

Closed
marek-mazur opened this issue Jan 16, 2015 · 6 comments
Closed

Consider creating 'Parameterized tests' #38

marek-mazur opened this issue Jan 16, 2015 · 6 comments

Comments

@marek-mazur
Copy link

Parameterized tests are the only one feature that i miss in green.

@params(1, 2, 3)
def test_nums(num):
    assert num < 4

or

@params((1, 2), (2, 3), (4, 5))
    def test_less_than(self, a, b):
        assert a < b

http://nose2.readthedocs.org/en/latest/params.html
https://github.com/nose-devs/nose2/blob/master/nose2/tools/params.py

@CleanCut
Copy link
Owner

That looks pretty cool!

@marek-mazur
Copy link
Author

Any plans?

@CleanCut
Copy link
Owner

I don't have any current plans, no. I have lots of other things going on at the moment.

I'd be happy to review a pull request if you or someone else would like to take a stab at it!

@marek-mazur
Copy link
Author

Ok. I will try to do it, when i find some time. ;)

@Julian
Copy link

Julian commented Mar 15, 2015

I'm not the author obviously :), but green is a test runner. It's annoying when things reinvent this sort of thing -- there are libraries that do this, and they should (I expect) work with green.

https://pypi.python.org/pypi/testscenarios is one, and I'm fairly sure I've ran green on test suites that use it successfully (although I use a fork of testscenarios which is even more likely to work with green).

@CleanCut
Copy link
Owner

Okay, we now support nose's parameterized tests in theory. Give it a try and let me know how it actually goes in practice. I'll consider this fixed unless I hear otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants