fix issue197 - in case a function is parametrized with zero arguments,

skip it during setup
This commit is contained in:
holger krekel
2012-10-06 11:34:06 +02:00
parent f588eae4f5
commit 55a8bfd174
3 changed files with 40 additions and 14 deletions

View File

@@ -303,6 +303,16 @@ class TestFunction:
assert f1 == f1_b
assert not f1 != f1_b
def test_issue197_parametrize_emptyset(self, testdir):
testdir.makepyfile("""
import pytest
@pytest.mark.parametrize('arg', [])
def test_function(arg):
pass
""")
reprec = testdir.inline_run()
reprec.assertoutcome(skipped=1)
def test_function_equality_with_callspec(self, testdir, tmpdir):
items = testdir.getitems("""
import pytest