@@ -221,21 +221,39 @@ def test_unset_environment(session: Session) -> None:
221
221
class PeriodRaisesBadSessionName (t .NamedTuple ):
222
222
"""Test fixture for bad session name names."""
223
223
224
+ test_id : str
224
225
session_name : str
225
226
raises : bool
226
227
227
228
229
+ PERIOD_RAISES_BAD_SESSION_NAME_FIXTURES : list [PeriodRaisesBadSessionName ] = [
230
+ PeriodRaisesBadSessionName (
231
+ test_id = "period_in_name" ,
232
+ session_name = "hey.period" ,
233
+ raises = True ,
234
+ ),
235
+ PeriodRaisesBadSessionName (
236
+ test_id = "colon_in_name" ,
237
+ session_name = "hey:its a colon" ,
238
+ raises = True ,
239
+ ),
240
+ PeriodRaisesBadSessionName (
241
+ test_id = "valid_name" ,
242
+ session_name = "hey moo" ,
243
+ raises = False ,
244
+ ),
245
+ ]
246
+
247
+
228
248
@pytest .mark .parametrize (
229
- PeriodRaisesBadSessionName ._fields ,
230
- [
231
- PeriodRaisesBadSessionName ("hey.period" , True ),
232
- PeriodRaisesBadSessionName ("hey:its a colon" , True ),
233
- PeriodRaisesBadSessionName ("hey moo" , False ),
234
- ],
249
+ list (PeriodRaisesBadSessionName ._fields ),
250
+ PERIOD_RAISES_BAD_SESSION_NAME_FIXTURES ,
251
+ ids = [test .test_id for test in PERIOD_RAISES_BAD_SESSION_NAME_FIXTURES ],
235
252
)
236
253
def test_periods_raise_bad_session_name (
237
254
server : Server ,
238
255
session : Session ,
256
+ test_id : str ,
239
257
session_name : str ,
240
258
raises : bool ,
241
259
) -> None :
0 commit comments