@@ -71,6 +71,7 @@ def test_datetime_with_tz():
71
71
72
72
73
73
def test_datetime_pyarrow ():
74
+ pytest .importorskip ("pyarrow" )
74
75
result = datetime (backend = "pyarrow" )
75
76
assert isinstance (result , ArrowDtype )
76
77
assert str (result ) == "timestamp[ns][pyarrow]"
@@ -101,6 +102,7 @@ def test_integer_numpy():
101
102
102
103
103
104
def test_integer_pyarrow ():
105
+ pytest .importorskip ("pyarrow" )
104
106
result = integer (bits = 64 , backend = "pyarrow" )
105
107
assert isinstance (result , ArrowDtype )
106
108
assert str (result ) == "int64[pyarrow]"
@@ -126,19 +128,22 @@ def test_floating_numpy():
126
128
127
129
128
130
def test_floating_pyarrow ():
131
+ pytest .importorskip ("pyarrow" )
129
132
result = floating (bits = 64 , backend = "pyarrow" )
130
133
assert isinstance (result , ArrowDtype )
131
134
assert str (result ) == "double[pyarrow]"
132
135
133
136
134
137
# Decimal
135
138
def test_decimal_default ():
139
+ pytest .importorskip ("pyarrow" )
136
140
result = decimal (precision = 38 , scale = 10 )
137
141
assert isinstance (result , ArrowDtype )
138
142
assert str (result ) == "decimal128(38, 10)[pyarrow]"
139
143
140
144
141
145
def test_decimal_with_precision_scale ():
146
+ pytest .importorskip ("pyarrow" )
142
147
result = decimal (precision = 10 , scale = 2 )
143
148
assert isinstance (result , ArrowDtype )
144
149
assert str (result ) == "decimal128(10, 2)[pyarrow]"
@@ -152,6 +157,7 @@ def test_boolean_default():
152
157
153
158
154
159
def test_boolean_pyarrow ():
160
+ pytest .importorskip ("pyarrow" )
155
161
result = boolean (backend = "pyarrow" )
156
162
assert isinstance (result , ArrowDtype )
157
163
assert str (result ) == "bool[pyarrow]"
@@ -186,6 +192,7 @@ def test_categorical_default():
186
192
187
193
188
194
def test_categorical_pyarrow ():
195
+ pytest .importorskip ("pyarrow" )
189
196
result = categorical (backend = "pyarrow" )
190
197
assert isinstance (result , ArrowDtype )
191
198
assert str (result ) == "dictionary<values=string, indices=int32, ordered=0>[pyarrow]"
@@ -199,6 +206,7 @@ def test_interval_default():
199
206
200
207
201
208
def test_interval_pyarrow ():
209
+ pytest .importorskip ("pyarrow" )
202
210
result = interval (backend = "pyarrow" )
203
211
assert isinstance (result , ArrowDtype )
204
212
assert str (result ) == "struct<left: double, right: double>[pyarrow]"
@@ -212,32 +220,37 @@ def test_period_default():
212
220
213
221
214
222
def test_period_pyarrow ():
223
+ pytest .importorskip ("pyarrow" )
215
224
result = period (backend = "pyarrow" )
216
225
assert isinstance (result , ArrowDtype )
217
226
assert str (result ) == "month_day_nano_interval[pyarrow]"
218
227
219
228
220
229
# Date
221
230
def test_date_default ():
231
+ pytest .importorskip ("pyarrow" )
222
232
result = date ()
223
233
assert isinstance (result , ArrowDtype )
224
234
assert str (result ) == "date32[day][pyarrow]"
225
235
226
236
227
237
def test_date_pyarrow ():
238
+ pytest .importorskip ("pyarrow" )
228
239
result = date (backend = "pyarrow" )
229
240
assert isinstance (result , ArrowDtype )
230
241
assert str (result ) == "date32[day][pyarrow]"
231
242
232
243
233
244
# Duration
234
245
def test_duration_default ():
246
+ pytest .importorskip ("pyarrow" )
235
247
result = duration ()
236
248
assert isinstance (result , ArrowDtype )
237
249
assert str (result ) == "duration[ns][pyarrow]"
238
250
239
251
240
252
def test_duration_pyarrow ():
253
+ pytest .importorskip ("pyarrow" )
241
254
result = duration (backend = "pyarrow" )
242
255
assert isinstance (result , ArrowDtype )
243
256
assert str (result ) == "duration[ns][pyarrow]"
0 commit comments