zeroshade commented on a change in pull request #11220:
URL: https://github.com/apache/arrow/pull/11220#discussion_r716847257



##########
File path: go/arrow/cdata/test/test_export_to_cgo.py
##########
@@ -91,5 +93,22 @@ def test_record_batch(self):
             cgotest.importRecordBatch(self.ptr_schema, self.ptr_array)
 
 
+class TestGoToPython(BaseTestGoPython):
+
+    def test_get_schema(self):
+        with self.assert_pyarrow_memory_released():
+            cgotest.exportSchema(self.ptr_schema)
+
+            sc = pa.Schema._import_from_c(self.ptr_schema)
+            assert sc == self.make_schema()
+    
+    def test_get_batch(self):
+        with self.assert_pyarrow_memory_released():
+            cgotest.exportRecordBatch(self.ptr_schema, self.ptr_array)
+            arrnew = pa.RecordBatch._import_from_c(self.ptr_array, 
self.ptr_schema)
+            assert arrnew == self.make_batch()
+    
+    

Review comment:
       added round trip tests for schema and record batch that do Python -> Go 
-> Python and confirm that the resulting schema and record batch are correct




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to