1414
1515
1616class TestMetafunc (object ):
17- def Metafunc (self , func ):
17+ def Metafunc (self , func , config = None ):
1818 # the unit tests of this class check if things work correctly
1919 # on the funcarg level, so we don't need a full blown
2020 # initiliazation
@@ -26,7 +26,7 @@ def __init__(self, names):
2626
2727 names = fixtures .getfuncargnames (func )
2828 fixtureinfo = FixtureInfo (names )
29- return python .Metafunc (func , fixtureinfo , None )
29+ return python .Metafunc (func , fixtureinfo , config )
3030
3131 def test_no_funcargs (self , testdir ):
3232 def function ():
@@ -156,7 +156,19 @@ def func(x, y):
156156 def test_parametrize_empty_list (self ):
157157 def func (y ):
158158 pass
159- metafunc = self .Metafunc (func )
159+
160+ class MockConfig (object ):
161+ def getini (self , name ):
162+ return ''
163+
164+ @property
165+ def hook (self ):
166+ return self
167+
168+ def pytest_make_parametrize_id (self , ** kw ):
169+ pass
170+
171+ metafunc = self .Metafunc (func , MockConfig ())
160172 metafunc .parametrize ("y" , [])
161173 assert 'skip' == metafunc ._calls [0 ].marks [0 ].name
162174
0 commit comments