MCPcopy Create free account
hub / github.com/apache/arrow / test_allow_copy_false

Function test_allow_copy_false

python/pyarrow/tests/interchange/test_conversion.py:441–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439
440@pytest.mark.pandas
441def test_allow_copy_false():
442 # Test that an error is raised when a copy is needed
443 # to create a bitmask
444
445 df = pd.DataFrame({"a": [0, 1.0, 2.0]})
446 with pytest.raises(RuntimeError):
447 pi.from_dataframe(df, allow_copy=False)
448
449 df = pd.DataFrame({
450 "dt": [None, dt(2007, 7, 14), dt(2007, 7, 15)]
451 })
452 with pytest.raises(RuntimeError):
453 pi.from_dataframe(df, allow_copy=False)
454
455
456@pytest.mark.pandas

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected