Skip to content

Commit c518835

Browse files
authored
CI: troubleshoot CI (#33898)
1 parent 1940fce commit c518835

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

pandas/tests/series/test_constructors.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1390,10 +1390,14 @@ def test_constructor_cast_object(self, index):
13901390
tm.assert_series_equal(s, exp)
13911391

13921392
@pytest.mark.parametrize("dtype", [np.datetime64, np.timedelta64])
1393-
def test_constructor_generic_timestamp_no_frequency(self, dtype):
1393+
def test_constructor_generic_timestamp_no_frequency(self, dtype, request):
13941394
# see gh-15524, gh-15987
13951395
msg = "dtype has no unit. Please pass in"
13961396

1397+
if np.dtype(dtype).name not in ["timedelta64", "datetime64"]:
1398+
mark = pytest.mark.xfail(reason="GH#33890 Is assigned ns unit")
1399+
request.node.add_marker(mark)
1400+
13971401
with pytest.raises(ValueError, match=msg):
13981402
Series([], dtype=dtype)
13991403

pandas/tests/series/test_dtypes.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,15 @@ def test_astype_categoricaldtype(self):
382382
tm.assert_index_equal(result.cat.categories, Index(["a", "b", "c"]))
383383

384384
@pytest.mark.parametrize("dtype", [np.datetime64, np.timedelta64])
385-
def test_astype_generic_timestamp_no_frequency(self, dtype):
385+
def test_astype_generic_timestamp_no_frequency(self, dtype, request):
386386
# see gh-15524, gh-15987
387387
data = [1]
388388
s = Series(data)
389389

390+
if np.dtype(dtype).name not in ["timedelta64", "datetime64"]:
391+
mark = pytest.mark.xfail(reason="GH#33890 Is assigned ns unit")
392+
request.node.add_marker(mark)
393+
390394
msg = (
391395
fr"The '{dtype.__name__}' dtype has no unit\. "
392396
fr"Please pass in '{dtype.__name__}\[ns\]' instead."

0 commit comments

Comments
 (0)