Exemple #1
0
 def test_primitive_python(self):
     """
     Python -> Rust -> Python
     """
     a = pyarrow.array([1, 2, 3])
     b = arrow_pyarrow_integration_testing.double(a)
     self.assertEqual(b, pyarrow.array([2, 4, 6]))
Exemple #2
0
def test_primitive_python():
    """
    Python -> Rust -> Python
    """
    a = pa.array([1, 2, 3])
    b = rust.double(a)
    assert b == pa.array([2, 4, 6])
    del a
    del b
Exemple #3
0
 def test_primitive_python(self):
     """
     Python -> Rust -> Python
     """
     old_allocated = pyarrow.total_allocated_bytes()
     a = pyarrow.array([1, 2, 3])
     b = arrow_pyarrow_integration_testing.double(a)
     self.assertEqual(b, pyarrow.array([2, 4, 6]))
     del a
     del b
     # No leak of C++ memory
     self.assertEqual(old_allocated, pyarrow.total_allocated_bytes())