@@ -277,7 +277,7 @@ def test_map(idx):
277
277
def test_map_dictlike (idx , mapper ):
278
278
279
279
if isinstance (idx , (pd .CategoricalIndex , pd .IntervalIndex )):
280
- pytest .skip ("skipping tests for {}" . format ( type (idx )) )
280
+ pytest .skip (f "skipping tests for { type (idx )} " )
281
281
282
282
identity = mapper (idx .values , idx )
283
283
@@ -330,13 +330,13 @@ def test_numpy_ufuncs(idx, func):
330
330
331
331
if _np_version_under1p17 :
332
332
expected_exception = AttributeError
333
- msg = "'tuple' object has no attribute '{}'" . format ( func .__name__ )
333
+ msg = f "'tuple' object has no attribute '{ func .__name__ } '"
334
334
else :
335
335
expected_exception = TypeError
336
336
msg = (
337
337
"loop of ufunc does not support argument 0 of type tuple which"
338
- " has no callable {} method"
339
- ). format ( func . __name__ )
338
+ f " has no callable { func . __name__ } method"
339
+ )
340
340
with pytest .raises (expected_exception , match = msg ):
341
341
func (idx )
342
342
@@ -348,9 +348,9 @@ def test_numpy_ufuncs(idx, func):
348
348
)
349
349
def test_numpy_type_funcs (idx , func ):
350
350
msg = (
351
- "ufunc '{}' not supported for the input types, and the inputs"
351
+ f "ufunc '{ func . __name__ } ' not supported for the input types, and the inputs"
352
352
" could not be safely coerced to any supported types according to"
353
353
" the casting rule ''safe''"
354
- ). format ( func . __name__ )
354
+ )
355
355
with pytest .raises (TypeError , match = msg ):
356
356
func (idx )
0 commit comments