Skip to content

CI: failing timedelta64 test on Linux py37_locale build #33890

Open
@jorisvandenbossche

Description

@jorisvandenbossche

This is seen on a few PRs (eg https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=34508&view=logs&jobId=c4100758-acc4-5cd0-72d8-90828968cf00&j=c4100758-acc4-5cd0-72d8-90828968cf00)

=================================== FAILURES ===================================
___ TestSeriesDtypes.test_astype_generic_timestamp_no_frequency[timedelta64] ___
[gw0] linux -- Python 3.7.6 /home/vsts/miniconda3/envs/pandas-dev/bin/python

self = <pandas.tests.series.test_dtypes.TestSeriesDtypes object at 0x7f3d21a6c050>
dtype = <class 'numpy.timedelta64'>

    @pytest.mark.parametrize("dtype", [np.datetime64, np.timedelta64])
    def test_astype_generic_timestamp_no_frequency(self, dtype):
        # see gh-15524, gh-15987
        data = [1]
        s = Series(data)
    
        msg = (
            fr"The '{dtype.__name__}' dtype has no unit\. "
            fr"Please pass in '{dtype.__name__}\[ns\]' instead."
        )
        with pytest.raises(ValueError, match=msg):
>           s.astype(dtype)
E           Failed: DID NOT RAISE <class 'ValueError'>

pandas/tests/series/test_dtypes.py:395: Failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationTimedeltaTimedelta data type

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions