@@ -65,25 +65,28 @@ def pytest_runtest_setup(item):
65
65
pytest .skip ("skipping high memory test since --run-high-memory was not set" )
66
66
67
67
68
- # Configurations for all tests and all test modules
69
-
70
-
71
68
@pytest .fixture (autouse = True )
72
69
def configure_tests ():
70
+ """
71
+ Configure settings for all tests and test modules.
72
+ """
73
73
pd .set_option ("chained_assignment" , "raise" )
74
74
75
75
76
- # For running doctests: make np and pd names available
77
-
78
-
79
76
@pytest .fixture (autouse = True )
80
77
def add_imports (doctest_namespace ):
78
+ """
79
+ Make `np` and `pd` names available for doctests.
80
+ """
81
81
doctest_namespace ["np" ] = np
82
82
doctest_namespace ["pd" ] = pd
83
83
84
84
85
85
@pytest .fixture (params = ["bsr" , "coo" , "csc" , "csr" , "dia" , "dok" , "lil" ])
86
86
def spmatrix (request ):
87
+ """
88
+ Yields scipy sparse matrix classes.
89
+ """
87
90
from scipy import sparse
88
91
89
92
return getattr (sparse , request .param + "_matrix" )
@@ -92,8 +95,8 @@ def spmatrix(request):
92
95
@pytest .fixture (params = [0 , 1 , "index" , "columns" ], ids = lambda x : f"axis { repr (x )} " )
93
96
def axis (request ):
94
97
"""
95
- Fixture for returning the axis numbers of a DataFrame.
96
- """
98
+ Fixture for returning the axis numbers of a DataFrame.
99
+ """
97
100
return request .param
98
101
99
102
@@ -237,6 +240,10 @@ def all_boolean_reductions(request):
237
240
238
241
@pytest .fixture (params = list (_cython_table ))
239
242
def cython_table_items (request ):
243
+ """
244
+ Yields a tuple of a function and its corresponding name. Correspond to
245
+ the list of aggregator "Cython functions" used on selected table items.
246
+ """
240
247
return request .param
241
248
242
249
@@ -337,6 +344,9 @@ def writable(request):
337
344
338
345
@pytest .fixture (scope = "module" )
339
346
def datetime_tz_utc ():
347
+ """
348
+ Yields the UTC timezone object from the datetime module.
349
+ """
340
350
return timezone .utc
341
351
342
352
@@ -358,6 +368,9 @@ def join_type(request):
358
368
359
369
@pytest .fixture
360
370
def strict_data_files (pytestconfig ):
371
+ """
372
+ Returns the configuration for the test setting `--strict-data-files`.
373
+ """
361
374
return pytestconfig .getoption ("--strict-data-files" )
362
375
363
376
0 commit comments