Skip to content

Commit

Permalink
ARROW-8007: [Python] Remove unused and defunct assert_get_object_equa…
Browse files Browse the repository at this point in the history
…l in plasma tests

Closes #6540 from xhochy/ARROW-8007 and squashes the following commits:

de74d41 <Uwe L. Korn> ARROW-8007:  Remove unused and defunct assert_get_object_equal in plasma tests

Authored-by: Uwe L. Korn <uwe.korn@quantco.com>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
xhochy authored and wesm committed Mar 6, 2020
1 parent 8f61c79 commit 24cfd5f
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions python/pyarrow/tests/test_plasma.py
Expand Up @@ -82,27 +82,6 @@ def create_object(client, data_size, metadata_size=0, seal=True):
return object_id, memory_buffer, metadata


def assert_get_object_equal(unit_test, client1, client2, object_id,
memory_buffer=None, metadata=None):
import pyarrow.plasma as plasma
client1_buff = client1.get_buffers([object_id])[0]
client2_buff = client2.get_buffers([object_id])[0]
client1_metadata = client1.get_metadata([object_id])[0]
client2_metadata = client2.get_metadata([object_id])[0]
assert len(client1_buff) == len(client2_buff)
assert len(client1_metadata) == len(client2_metadata)
# Check that the buffers from the two clients are the same.
assert plasma.buffers_equal(client1_buff, client2_buff)
# Check that the metadata buffers from the two clients are the same.
assert plasma.buffers_equal(client1_metadata, client2_metadata)
# If a reference buffer was provided, check that it is the same as well.
if memory_buffer is not None:
assert plasma.buffers_equal(memory_buffer, client1_buff)
# If reference metadata was provided, check that it is the same as well.
if metadata is not None:
assert plasma.buffers_equal(metadata, client1_metadata)


@pytest.mark.plasma
class TestPlasmaClient:

Expand Down

0 comments on commit 24cfd5f

Please sign in to comment.