Skip to content

TST/COMPAT: test memory usage failed on macOS after change pytest-xdist -dist to no #39096

Open
@fangchenli

Description

@fangchenli

In #38905, I changed the distribution algorithm of pytest-xdist to no from loadfile. And the test pandas/tests/base/test_misc.py:test_memory_usage failed on macOS.

index_or_series_obj = Series([], Name: a, dtype: float64)

    @pytest.mark.skipif(PYPY, reason="not relevant for PyPy")
    def test_memory_usage(index_or_series_obj):
        obj = index_or_series_obj
    
        res = obj.memory_usage()
        res_deep = obj.memory_usage(deep=True)
    
        is_object = is_object_dtype(obj) or (
            isinstance(obj, Series) and is_object_dtype(obj.index)
        )
        is_categorical = is_categorical_dtype(obj.dtype) or (
            isinstance(obj, Series) and is_categorical_dtype(obj.index.dtype)
        )
    
        if len(obj) == 0:
            if isinstance(obj, Index):
                expected = 0
            else:
                expected = 108 if IS64 else 64
>           assert res_deep == res == expected
E           assert 0 == 108

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions