Example #1
0
 def test_string_python(self):
     """
     Python -> Rust -> Python
     """
     a = pyarrow.array(["a", None, "ccc"])
     b = arrow_pyarrow_integration_testing.substring(a, 1)
     self.assertEqual(b, pyarrow.array(["", None, "cc"]))
Example #2
0
def test_string_python():
    """
    Python -> Rust -> Python
    """
    a = pa.array(["a", None, "ccc"])
    b = rust.substring(a, 1)
    assert b == pa.array(["", None, "cc"])
    del a
    del b
Example #3
0
 def test_string_python(self):
     """
     Python -> Rust -> Python
     """
     old_allocated = pyarrow.total_allocated_bytes()
     a = pyarrow.array(["a", None, "ccc"])
     b = arrow_pyarrow_integration_testing.substring(a, 1)
     self.assertEqual(b, pyarrow.array(["", None, "cc"]))
     del a
     del b
     # No leak of C++ memory
     self.assertEqual(old_allocated, pyarrow.total_allocated_bytes())