|
13 | 13 | import warnings
|
14 | 14 | import cudf.testing.dataset_generator as dataset_generator
|
15 | 15 | from cudf import DataFrame, Series
|
16 |
| -from cudf.core._compat import PANDAS_GE_150, PANDAS_LT_140 |
| 16 | +from cudf.core._compat import PANDAS_GE_150, PANDAS_LT_140, PANDAS_EQ_200 |
17 | 17 | from cudf.core.index import DatetimeIndex
|
18 | 18 | from cudf.testing._utils import (
|
19 | 19 | DATETIME_TYPES,
|
@@ -1906,8 +1906,22 @@ def test_error_values():
|
1906 | 1906 | @pytest.mark.parametrize(
|
1907 | 1907 | "resolution", ["D", "H", "T", "min", "S", "L", "ms", "U", "us", "N"]
|
1908 | 1908 | )
|
1909 |
| -def test_ceil(data, time_type, resolution): |
1910 |
| - |
| 1909 | +def test_ceil(request, data, time_type, resolution): |
| 1910 | + alias_map = {"L": "ms", "U": "us", "N": "ns"} |
| 1911 | + request.applymarker( |
| 1912 | + pytest.mark.xfail( |
| 1913 | + condition=( |
| 1914 | + PANDAS_EQ_200 |
| 1915 | + and resolution in {"L", "ms", "U", "us", "N"} |
| 1916 | + and np.dtype( |
| 1917 | + f"datetime64[{alias_map.get(resolution, resolution)}]" |
| 1918 | + ) |
| 1919 | + > np.dtype(time_type) |
| 1920 | + ), |
| 1921 | + reason="https://github.com/pandas-dev/pandas/issues/52761", |
| 1922 | + strict=True, |
| 1923 | + ) |
| 1924 | + ) |
1911 | 1925 | gs = cudf.Series(data, dtype=time_type)
|
1912 | 1926 | ps = gs.to_pandas()
|
1913 | 1927 |
|
@@ -1937,7 +1951,22 @@ def test_ceil(data, time_type, resolution):
|
1937 | 1951 | @pytest.mark.parametrize(
|
1938 | 1952 | "resolution", ["D", "H", "T", "min", "S", "L", "ms", "U", "us", "N"]
|
1939 | 1953 | )
|
1940 |
| -def test_floor(data, time_type, resolution): |
| 1954 | +def test_floor(request, data, time_type, resolution): |
| 1955 | + alias_map = {"L": "ms", "U": "us", "N": "ns"} |
| 1956 | + request.applymarker( |
| 1957 | + pytest.mark.xfail( |
| 1958 | + condition=( |
| 1959 | + PANDAS_EQ_200 |
| 1960 | + and resolution in {"L", "ms", "U", "us", "N"} |
| 1961 | + and np.dtype( |
| 1962 | + f"datetime64[{alias_map.get(resolution, resolution)}]" |
| 1963 | + ) |
| 1964 | + > np.dtype(time_type) |
| 1965 | + ), |
| 1966 | + reason="https://github.com/pandas-dev/pandas/issues/52761", |
| 1967 | + strict=True, |
| 1968 | + ) |
| 1969 | + ) |
1941 | 1970 |
|
1942 | 1971 | gs = cudf.Series(data, dtype=time_type)
|
1943 | 1972 | ps = gs.to_pandas()
|
@@ -1968,7 +1997,22 @@ def test_floor(data, time_type, resolution):
|
1968 | 1997 | @pytest.mark.parametrize(
|
1969 | 1998 | "resolution", ["D", "H", "T", "min", "S", "L", "ms", "U", "us", "N"]
|
1970 | 1999 | )
|
1971 |
| -def test_round(data, time_type, resolution): |
| 2000 | +def test_round(request, data, time_type, resolution): |
| 2001 | + alias_map = {"L": "ms", "U": "us", "N": "ns"} |
| 2002 | + request.applymarker( |
| 2003 | + pytest.mark.xfail( |
| 2004 | + condition=( |
| 2005 | + PANDAS_EQ_200 |
| 2006 | + and resolution in {"L", "ms", "U", "us", "N"} |
| 2007 | + and np.dtype( |
| 2008 | + f"datetime64[{alias_map.get(resolution, resolution)}]" |
| 2009 | + ) |
| 2010 | + > np.dtype(time_type) |
| 2011 | + ), |
| 2012 | + reason="https://github.com/pandas-dev/pandas/issues/52761", |
| 2013 | + strict=True, |
| 2014 | + ) |
| 2015 | + ) |
1972 | 2016 |
|
1973 | 2017 | gs = cudf.Series(data, dtype=time_type)
|
1974 | 2018 | ps = gs.to_pandas()
|
|
0 commit comments