Improve error message when TestCase functions use a parametrized fixture

Fix #2535
This commit is contained in:
Bruno Oliveira
2018-10-03 19:42:41 -03:00
parent e712adc226
commit 212937eb3e
5 changed files with 52 additions and 7 deletions

View File

@@ -0,0 +1,13 @@
import pytest
import unittest
@pytest.fixture(params=[1, 2])
def two(request):
return request.param
@pytest.mark.usefixtures("two")
class TestSomethingElse(unittest.TestCase):
def test_two(self):
pass