@@ -699,6 +699,7 @@ def test_method(self, something):
699
699
"""
700
700
)
701
701
(item1 ,) = pytester .genitems ([modcol ])
702
+ assert isinstance (item1 , Function )
702
703
assert item1 .name == "test_method"
703
704
arg2fixturedefs = fixtures .FixtureRequest (
704
705
item1 , _ispytest = True
@@ -967,6 +968,7 @@ def test_second():
967
968
def test_request_getmodulepath (self , pytester : Pytester ) -> None :
968
969
modcol = pytester .getmodulecol ("def test_somefunc(): pass" )
969
970
(item ,) = pytester .genitems ([modcol ])
971
+ assert isinstance (item , Function )
970
972
req = fixtures .FixtureRequest (item , _ispytest = True )
971
973
assert req .path == modcol .path
972
974
@@ -1125,6 +1127,7 @@ def test_func2(self, something):
1125
1127
pass
1126
1128
"""
1127
1129
)
1130
+ assert isinstance (item1 , Function )
1128
1131
req1 = fixtures .FixtureRequest (item1 , _ispytest = True )
1129
1132
assert "xfail" not in item1 .keywords
1130
1133
req1 .applymarker (pytest .mark .xfail )
@@ -4009,6 +4012,7 @@ def test_func(m1):
4009
4012
"""
4010
4013
)
4011
4014
items , _ = pytester .inline_genitems ()
4015
+ assert isinstance (items [0 ], Function )
4012
4016
request = FixtureRequest (items [0 ], _ispytest = True )
4013
4017
assert request .fixturenames == "m1 f1" .split ()
4014
4018
@@ -4057,6 +4061,7 @@ def test_foo(f1, p1, m1, f2, s1): pass
4057
4061
"""
4058
4062
)
4059
4063
items , _ = pytester .inline_genitems ()
4064
+ assert isinstance (items [0 ], Function )
4060
4065
request = FixtureRequest (items [0 ], _ispytest = True )
4061
4066
# order of fixtures based on their scope and position in the parameter list
4062
4067
assert (
@@ -4084,6 +4089,7 @@ def test_func(f1, m1):
4084
4089
"""
4085
4090
)
4086
4091
items , _ = pytester .inline_genitems ()
4092
+ assert isinstance (items [0 ], Function )
4087
4093
request = FixtureRequest (items [0 ], _ispytest = True )
4088
4094
assert request .fixturenames == "m1 f1" .split ()
4089
4095
@@ -4117,6 +4123,7 @@ def test_func(self, f2, f1, c1, m1, s1):
4117
4123
"""
4118
4124
)
4119
4125
items , _ = pytester .inline_genitems ()
4126
+ assert isinstance (items [0 ], Function )
4120
4127
request = FixtureRequest (items [0 ], _ispytest = True )
4121
4128
assert request .fixturenames == "s1 m1 c1 f2 f1" .split ()
4122
4129
@@ -4159,6 +4166,7 @@ def test_func(m_test, f1):
4159
4166
}
4160
4167
)
4161
4168
items , _ = pytester .inline_genitems ()
4169
+ assert isinstance (items [0 ], Function )
4162
4170
request = FixtureRequest (items [0 ], _ispytest = True )
4163
4171
assert request .fixturenames == "p_sub m_conf m_sub m_test f1" .split ()
4164
4172
@@ -4203,6 +4211,7 @@ def test_func(self, f2, f1, m2):
4203
4211
"""
4204
4212
)
4205
4213
items , _ = pytester .inline_genitems ()
4214
+ assert isinstance (items [0 ], Function )
4206
4215
request = FixtureRequest (items [0 ], _ispytest = True )
4207
4216
assert request .fixturenames == "s1 p1 m1 m2 c1 f2 f1" .split ()
4208
4217
0 commit comments