コード例 #1
0
ファイル: test_sql.py プロジェクト: abreis/arrow2
 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"]))
コード例 #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
コード例 #3
0
ファイル: test_sql.py プロジェクト: TheVinhLuong102/arrow
 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())