|
33 | 33 | # TODO: more freq variants
|
34 | 34 | @pytest.fixture(params=["D", "B", "W", "M", "Q", "Y"])
|
35 | 35 | def freqstr(request):
|
| 36 | + """Fixture returning parametrized frequency in string format.""" |
36 | 37 | return request.param
|
37 | 38 |
|
38 | 39 |
|
@@ -81,6 +82,7 @@ class SharedTests:
|
81 | 82 |
|
82 | 83 | @pytest.fixture
|
83 | 84 | def arr1d(self):
|
| 85 | + """Fixture returning DatetimeArray with daily frequency.""" |
84 | 86 | data = np.arange(10, dtype="i8") * 24 * 3600 * 10**9
|
85 | 87 | arr = self.array_cls(data, freq="D")
|
86 | 88 | return arr
|
@@ -635,6 +637,10 @@ class TestDatetimeArray(SharedTests):
|
635 | 637 |
|
636 | 638 | @pytest.fixture
|
637 | 639 | def arr1d(self, tz_naive_fixture, freqstr):
|
| 640 | + """ |
| 641 | + Fixture returning DatetimeArray with parametrized frequency and |
| 642 | + timezones |
| 643 | + """ |
638 | 644 | tz = tz_naive_fixture
|
639 | 645 | dti = pd.date_range("2016-01-01 01:01:00", periods=5, freq=freqstr, tz=tz)
|
640 | 646 | dta = dti._data
|
@@ -1068,6 +1074,9 @@ class TestPeriodArray(SharedTests):
|
1068 | 1074 |
|
1069 | 1075 | @pytest.fixture
|
1070 | 1076 | def arr1d(self, period_index):
|
| 1077 | + """ |
| 1078 | + Fixture returning DatetimeArray from parametrized PeriodIndex objects |
| 1079 | + """ |
1071 | 1080 | return period_index._data
|
1072 | 1081 |
|
1073 | 1082 | def test_from_pi(self, arr1d):
|
@@ -1389,6 +1398,10 @@ def test_from_pandas_array(dtype):
|
1389 | 1398 | ]
|
1390 | 1399 | )
|
1391 | 1400 | def array_likes(request):
|
| 1401 | + """ |
| 1402 | + Fixture giving a numpy array and a parametrized 'data' object, which can |
| 1403 | + be a memoryview, array, dask or xarray object created from the numpy array. |
| 1404 | + """ |
1392 | 1405 | # GH#24539 recognize e.g xarray, dask, ...
|
1393 | 1406 | arr = np.array([1, 2, 3], dtype=np.int64)
|
1394 | 1407 |
|
|
0 commit comments