Skip to content

Commit 6315194

Browse files
used pytest.importorskip
1 parent abe76ea commit 6315194

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/tests/tseries/frequencies/test_inference.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
datetime,
33
timedelta,
44
)
5-
import importlib
65

76
import numpy as np
87
import pytest
@@ -557,9 +556,6 @@ def test_infer_freq_non_nano_tzaware(tz_aware_fixture):
557556
assert res == "B"
558557

559558

560-
@pytest.mark.skipif(
561-
importlib.util.find_spec("pyarrow") is None, reason="pyarrow not installed"
562-
)
563559
@pytest.mark.parametrize(
564560
("data", "expected"),
565561
[
@@ -579,5 +575,6 @@ def test_infer_freq_non_nano_tzaware(tz_aware_fixture):
579575
)
580576
@pytest.mark.parametrize("cls", [Index, Series])
581577
def test_infer_freq_pyarrow(data, expected, cls):
578+
pytest.importorskip("pyarrow")
582579
obj = cls(data).astype("timestamp[s][pyarrow]")
583580
assert frequencies.infer_freq(obj) == expected

0 commit comments

Comments
 (0)