Skip to content

Are tests failing on Windows? #21905

Closed
@topper-123

Description

@topper-123

Running the tests on windows fail:

>>> pytest pandas\tests\tseries\offsets\test_offsets.py -x
――――――――――――――――――――― TestCommon.test_apply[BusinessDay0] ―――――――――――――――――――――

self = <pandas.tests.tseries.offsets.test_offsets.TestCommon object at 0x066D4530>
offset_types = <class 'pandas.tseries.offsets.BusinessDay'>

    def test_apply(self, offset_types):
        sdt = datetime(2011, 1, 1, 9, 0)
        ndt = np_datetime64_compat('2011-01-01 09:00Z')

        for dt in [sdt, ndt]:
            expected = self.expecteds[offset_types.__name__]
            self._check_offsetfunc_works(offset_types, 'apply', dt, expected)

            expected = Timestamp(expected.date())
            self._check_offsetfunc_works(offset_types, 'apply', dt, expected,
>                                        normalize=True)

pandas\tests\tseries\offsets\test_offsets.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas\tests\tseries\offsets\test_offsets.py:320: in _check_offsetfunc_works
    result = func(dt_tz)
pandas\tseries\offsets.py:85: in wrapper
    result = result.normalize()
pandas\_libs\tslibs\timestamps.pyx:1086: in pandas._libs.tslibs.timestamps.Timestamp.normalize
    normalized_value = normalize_i8_timestamps(
pandas\_libs\tslibs\conversion.pyx:1095: in pandas._libs.tslibs.conversion.normalize_i8_timestamps
    result = _normalize_local(stamps, tz)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   pos = trans.searchsorted(stamps, side='right') - 1
E   ValueError: Buffer dtype mismatch, expected 'int64_t' but got 'int'

pandas\_libs\tslibs\conversion.pyx:1151: ValueError

Several tests fail.

By going back in commit history until the tests pass, it looks like this is caused by #21826.

Metadata

Metadata

Assignees

No one assigned

    Labels

    32bit32-bit systemsTestingpandas testing functions or related to the test suiteWindowsWindows OS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions