Inzynierka/Lib/site-packages/pandas/tests/util/test_shares_memory.py
2023-06-02 12:51:02 +02:00

14 lines
345 B
Python

import pandas as pd
import pandas._testing as tm
def test_shares_memory_interval():
obj = pd.interval_range(1, 5)
assert tm.shares_memory(obj, obj)
assert tm.shares_memory(obj, obj._data)
assert tm.shares_memory(obj, obj[::-1])
assert tm.shares_memory(obj, obj[:2])
assert not tm.shares_memory(obj, obj._data.copy())