@@ -163,7 +163,7 @@ def ordered_fixture(request):
163
163
@pytest .fixture (params = _all_arithmetic_operators )
164
164
def all_arithmetic_operators (request ):
165
165
"""
166
- Fixture for dunder names for common arithmetic operations
166
+ Fixture for dunder names for common arithmetic operations.
167
167
"""
168
168
return request .param
169
169
@@ -190,7 +190,9 @@ def all_arithmetic_functions(request):
190
190
"""
191
191
Fixture for operator and roperator arithmetic functions.
192
192
193
- Note: This includes divmod and rdivmod, whereas all_arithmetic_operators
193
+ Notes
194
+ -----
195
+ This includes divmod and rdivmod, whereas all_arithmetic_operators
194
196
does not.
195
197
"""
196
198
return request .param
@@ -213,7 +215,7 @@ def all_arithmetic_functions(request):
213
215
@pytest .fixture (params = _all_numeric_reductions )
214
216
def all_numeric_reductions (request ):
215
217
"""
216
- Fixture for numeric reduction names
218
+ Fixture for numeric reduction names.
217
219
"""
218
220
return request .param
219
221
@@ -224,7 +226,7 @@ def all_numeric_reductions(request):
224
226
@pytest .fixture (params = _all_boolean_reductions )
225
227
def all_boolean_reductions (request ):
226
228
"""
227
- Fixture for boolean reduction names
229
+ Fixture for boolean reduction names.
228
230
"""
229
231
return request .param
230
232
@@ -251,7 +253,7 @@ def _get_cython_table_params(ndframe, func_names_and_expected):
251
253
252
254
Returns
253
255
-------
254
- results : list
256
+ list
255
257
List of three items (DataFrame, function, expected result)
256
258
"""
257
259
results = []
@@ -310,7 +312,7 @@ def all_logical_operators(request):
310
312
@pytest .fixture (params = [None , "gzip" , "bz2" , "zip" , "xz" ])
311
313
def compression (request ):
312
314
"""
313
- Fixture for trying common compression types in compression tests
315
+ Fixture for trying common compression types in compression tests.
314
316
"""
315
317
return request .param
316
318
@@ -319,15 +321,15 @@ def compression(request):
319
321
def compression_only (request ):
320
322
"""
321
323
Fixture for trying common compression types in compression tests excluding
322
- uncompressed case
324
+ uncompressed case.
323
325
"""
324
326
return request .param
325
327
326
328
327
329
@pytest .fixture (params = [True , False ])
328
330
def writable (request ):
329
331
"""
330
- Fixture that an array is writable
332
+ Fixture that an array is writable.
331
333
"""
332
334
return request .param
333
335
@@ -340,15 +342,15 @@ def datetime_tz_utc():
340
342
@pytest .fixture (params = ["utc" , "dateutil/UTC" , utc , tzutc (), timezone .utc ])
341
343
def utc_fixture (request ):
342
344
"""
343
- Fixture to provide variants of UTC timezone strings and tzinfo objects
345
+ Fixture to provide variants of UTC timezone strings and tzinfo objects.
344
346
"""
345
347
return request .param
346
348
347
349
348
350
@pytest .fixture (params = ["inner" , "outer" , "left" , "right" ])
349
351
def join_type (request ):
350
352
"""
351
- Fixture for trying all types of join operations
353
+ Fixture for trying all types of join operations.
352
354
"""
353
355
return request .param
354
356
@@ -370,7 +372,7 @@ def datapath(strict_data_files):
370
372
371
373
Returns
372
374
-------
373
- path : path including ``pandas/tests``.
375
+ path including ``pandas/tests``.
374
376
375
377
Raises
376
378
------
@@ -383,11 +385,11 @@ def deco(*args):
383
385
path = os .path .join (BASE_PATH , * args )
384
386
if not os .path .exists (path ):
385
387
if strict_data_files :
386
- msg = "Could not find file {} and --strict-data-files is set."
387
- raise ValueError (msg .format (path ))
388
+ raise ValueError (
389
+ f"Could not find file { path } and --strict-data-files is set."
390
+ )
388
391
else :
389
- msg = "Could not find {}."
390
- pytest .skip (msg .format (path ))
392
+ pytest .skip (f"Could not find { path } ." )
391
393
return path
392
394
393
395
return deco
@@ -404,31 +406,31 @@ def iris(datapath):
404
406
@pytest .fixture (params = ["nlargest" , "nsmallest" ])
405
407
def nselect_method (request ):
406
408
"""
407
- Fixture for trying all nselect methods
409
+ Fixture for trying all nselect methods.
408
410
"""
409
411
return request .param
410
412
411
413
412
414
@pytest .fixture (params = ["left" , "right" , "both" , "neither" ])
413
415
def closed (request ):
414
416
"""
415
- Fixture for trying all interval closed parameters
417
+ Fixture for trying all interval closed parameters.
416
418
"""
417
419
return request .param
418
420
419
421
420
422
@pytest .fixture (params = ["left" , "right" , "both" , "neither" ])
421
423
def other_closed (request ):
422
424
"""
423
- Secondary closed fixture to allow parametrizing over all pairs of closed
425
+ Secondary closed fixture to allow parametrizing over all pairs of closed.
424
426
"""
425
427
return request .param
426
428
427
429
428
430
@pytest .fixture (params = [None , np .nan , pd .NaT , float ("nan" ), np .float ("NaN" )])
429
431
def nulls_fixture (request ):
430
432
"""
431
- Fixture for each null type in pandas
433
+ Fixture for each null type in pandas.
432
434
"""
433
435
return request .param
434
436
@@ -439,7 +441,7 @@ def nulls_fixture(request):
439
441
@pytest .fixture (params = [None , np .nan , pd .NaT ])
440
442
def unique_nulls_fixture (request ):
441
443
"""
442
- Fixture for each null type in pandas, each null type exactly once
444
+ Fixture for each null type in pandas, each null type exactly once.
443
445
"""
444
446
return request .param
445
447
@@ -589,7 +591,6 @@ def float_dtype(request):
589
591
* 'float32'
590
592
* 'float64'
591
593
"""
592
-
593
594
return request .param
594
595
595
596
@@ -602,7 +603,6 @@ def complex_dtype(request):
602
603
* 'complex64'
603
604
* 'complex128'
604
605
"""
605
-
606
606
return request .param
607
607
608
608
@@ -617,7 +617,6 @@ def sint_dtype(request):
617
617
* 'int32'
618
618
* 'int64'
619
619
"""
620
-
621
620
return request .param
622
621
623
622
@@ -631,7 +630,6 @@ def uint_dtype(request):
631
630
* 'uint32'
632
631
* 'uint64'
633
632
"""
634
-
635
633
return request .param
636
634
637
635
@@ -650,7 +648,6 @@ def any_int_dtype(request):
650
648
* 'int64'
651
649
* 'uint64'
652
650
"""
653
-
654
651
return request .param
655
652
656
653
@@ -690,7 +687,6 @@ def any_real_dtype(request):
690
687
* 'float32'
691
688
* 'float64'
692
689
"""
693
-
694
690
return request .param
695
691
696
692
@@ -728,7 +724,6 @@ def any_numpy_dtype(request):
728
724
* object
729
725
* 'object'
730
726
"""
731
-
732
727
return request .param
733
728
734
729
0 commit comments