@@ -699,6 +699,7 @@ def test_method(self, something):
699699 """
700700 )
701701 (item1 ,) = pytester .genitems ([modcol ])
702+ assert isinstance (item1 , Function )
702703 assert item1 .name == "test_method"
703704 arg2fixturedefs = fixtures .FixtureRequest (
704705 item1 , _ispytest = True
@@ -967,6 +968,7 @@ def test_second():
967968 def test_request_getmodulepath (self , pytester : Pytester ) -> None :
968969 modcol = pytester .getmodulecol ("def test_somefunc(): pass" )
969970 (item ,) = pytester .genitems ([modcol ])
971+ assert isinstance (item , Function )
970972 req = fixtures .FixtureRequest (item , _ispytest = True )
971973 assert req .path == modcol .path
972974
@@ -1125,6 +1127,7 @@ def test_func2(self, something):
11251127 pass
11261128 """
11271129 )
1130+ assert isinstance (item1 , Function )
11281131 req1 = fixtures .FixtureRequest (item1 , _ispytest = True )
11291132 assert "xfail" not in item1 .keywords
11301133 req1 .applymarker (pytest .mark .xfail )
@@ -4009,6 +4012,7 @@ def test_func(m1):
40094012 """
40104013 )
40114014 items , _ = pytester .inline_genitems ()
4015+ assert isinstance (items [0 ], Function )
40124016 request = FixtureRequest (items [0 ], _ispytest = True )
40134017 assert request .fixturenames == "m1 f1" .split ()
40144018
@@ -4057,6 +4061,7 @@ def test_foo(f1, p1, m1, f2, s1): pass
40574061 """
40584062 )
40594063 items , _ = pytester .inline_genitems ()
4064+ assert isinstance (items [0 ], Function )
40604065 request = FixtureRequest (items [0 ], _ispytest = True )
40614066 # order of fixtures based on their scope and position in the parameter list
40624067 assert (
@@ -4084,6 +4089,7 @@ def test_func(f1, m1):
40844089 """
40854090 )
40864091 items , _ = pytester .inline_genitems ()
4092+ assert isinstance (items [0 ], Function )
40874093 request = FixtureRequest (items [0 ], _ispytest = True )
40884094 assert request .fixturenames == "m1 f1" .split ()
40894095
@@ -4117,6 +4123,7 @@ def test_func(self, f2, f1, c1, m1, s1):
41174123 """
41184124 )
41194125 items , _ = pytester .inline_genitems ()
4126+ assert isinstance (items [0 ], Function )
41204127 request = FixtureRequest (items [0 ], _ispytest = True )
41214128 assert request .fixturenames == "s1 m1 c1 f2 f1" .split ()
41224129
@@ -4159,6 +4166,7 @@ def test_func(m_test, f1):
41594166 }
41604167 )
41614168 items , _ = pytester .inline_genitems ()
4169+ assert isinstance (items [0 ], Function )
41624170 request = FixtureRequest (items [0 ], _ispytest = True )
41634171 assert request .fixturenames == "p_sub m_conf m_sub m_test f1" .split ()
41644172
@@ -4203,6 +4211,7 @@ def test_func(self, f2, f1, m2):
42034211 """
42044212 )
42054213 items , _ = pytester .inline_genitems ()
4214+ assert isinstance (items [0 ], Function )
42064215 request = FixtureRequest (items [0 ], _ispytest = True )
42074216 assert request .fixturenames == "s1 p1 m1 m2 c1 f2 f1" .split ()
42084217
0 commit comments