Skip to content

Commit 3de5485

Browse files
committed
Remove column fixtures
1 parent 66eda6a commit 3de5485

13 files changed

+2
-71
lines changed

pandas/tests/extension/arrow/test_bool.py

-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ def dtype():
1515
return ArrowBoolDtype()
1616

1717

18-
@pytest.fixture
19-
def columns():
20-
values = np.random.randint(0, 2, size=100, dtype=bool)
21-
values[1] = ~values[0]
22-
return ArrowBoolArray.from_scalars(values)
23-
24-
2518
@pytest.fixture
2619
def data():
2720
values = np.random.randint(0, 2, size=100, dtype=bool)

pandas/tests/extension/base/constructors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ def test_pandas_array_dtype(self, data):
8484
expected = pd.arrays.PandasArray(np.asarray(data, dtype=object))
8585
self.assert_equal(result, expected)
8686

87-
def test_construct_empty_dataframe(self, columns, dtype):
87+
def test_construct_empty_dataframe(self, dtype):
8888
# GH 33623
89-
pd.DataFrame(columns=columns, dtype=dtype)
89+
pd.DataFrame(columns=["a"], dtype=dtype)

pandas/tests/extension/decimal/test_decimal.py

-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ def dtype():
1717
return DecimalDtype()
1818

1919

20-
@pytest.fixture
21-
def columns():
22-
return DecimalArray(make_data())
23-
24-
2520
@pytest.fixture
2621
def data():
2722
return DecimalArray(make_data())

pandas/tests/extension/json/test_json.py

-10
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ def dtype():
1515
return JSONDtype()
1616

1717

18-
@pytest.fixture
19-
def columns():
20-
data = make_data()
21-
22-
while len(data[0]) == len(data[1]):
23-
data = make_data()
24-
25-
return JSONArray(data)
26-
27-
2818
@pytest.fixture
2919
def data():
3020
"""Length-100 PeriodArray for semantics test."""

pandas/tests/extension/test_boolean.py

-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ def dtype():
3333
return BooleanDtype()
3434

3535

36-
@pytest.fixture
37-
def columns(dtype):
38-
return pd.array([True, False], dtype=dtype)
39-
40-
4136
@pytest.fixture
4237
def data(dtype):
4338
return pd.array(make_data(), dtype=dtype)

pandas/tests/extension/test_categorical.py

-5
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ def dtype():
4141
return CategoricalDtype()
4242

4343

44-
@pytest.fixture
45-
def columns():
46-
return Categorical(make_data())
47-
48-
4944
@pytest.fixture
5045
def data():
5146
"""Length-100 array for this type.

pandas/tests/extension/test_datetime.py

-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ def dtype(request):
1313
return DatetimeTZDtype(unit="ns", tz=request.param)
1414

1515

16-
@pytest.fixture
17-
def columns(dtype):
18-
return DatetimeArray(pd.date_range("2000", periods=100, tz=dtype.tz), dtype=dtype)
19-
20-
2116
@pytest.fixture
2217
def data(dtype):
2318
data = DatetimeArray(pd.date_range("2000", periods=100, tz=dtype.tz), dtype=dtype)

pandas/tests/extension/test_integer.py

-5
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ def dtype(request):
5454
return request.param()
5555

5656

57-
@pytest.fixture
58-
def columns():
59-
return integer_array(make_data())
60-
61-
6257
@pytest.fixture
6358
def data(dtype):
6459
return integer_array(make_data(), dtype=dtype)

pandas/tests/extension/test_interval.py

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ def dtype():
3535
return IntervalDtype()
3636

3737

38-
@pytest.fixture
39-
def columns():
40-
return IntervalArray(make_data())
41-
42-
4338
@pytest.fixture
4439
def data():
4540
"""Length-100 PeriodArray for semantics test."""

pandas/tests/extension/test_numpy.py

-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ def allow_in_pandas(monkeypatch):
3737
yield
3838

3939

40-
@pytest.fixture
41-
def columns():
42-
return PandasArray(np.arange(1, 3))
43-
44-
4540
@pytest.fixture
4641
def data(allow_in_pandas, dtype):
4742
if dtype.numpy_dtype == "object":

pandas/tests/extension/test_period.py

-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ def dtype():
1515
return PeriodDtype(freq="D")
1616

1717

18-
@pytest.fixture
19-
def columns(dtype):
20-
return PeriodArray(np.arange(2020, 2021), freq=dtype.freq)
21-
22-
2318
@pytest.fixture
2419
def data(dtype):
2520
return PeriodArray(np.arange(1970, 2070), freq=dtype.freq)

pandas/tests/extension/test_sparse.py

-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ def dtype():
2929
return SparseDtype()
3030

3131

32-
@pytest.fixture
33-
def columns():
34-
return SparseArray(np.ones(10) * 2)
35-
36-
3732
@pytest.fixture(params=[0, np.nan])
3833
def data(request):
3934
"""Length-100 PeriodArray for semantics test."""

pandas/tests/extension/test_string.py

-7
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ def dtype():
1313
return StringDtype()
1414

1515

16-
@pytest.fixture
17-
def columns():
18-
strings = np.random.choice(list(string.ascii_letters), size=1)
19-
20-
return StringArray._from_sequence(strings)
21-
22-
2316
@pytest.fixture
2417
def data():
2518
strings = np.random.choice(list(string.ascii_letters), size=100)

0 commit comments

Comments
 (0)