Commit 47b0ba53 authored by Levin Zimmermann's avatar Levin Zimmermann

erp5_wendelin: Add test for setArrayDtypeNames

parent e066dca3
...@@ -618,4 +618,18 @@ data_bucket_stream.insertBucket(1, "1" * 100000) ...@@ -618,4 +618,18 @@ data_bucket_stream.insertBucket(1, "1" * 100000)
result = [x for x in data_bucket_stream.getBucketIndexKeySequenceByIndex()] result = [x for x in data_bucket_stream.getBucketIndexKeySequenceByIndex()]
""" """
self.createAndRunScript(code) self.createAndRunScript(code)
\ No newline at end of file
def test_15_setArrayDtypeNames(self):
"""
Test Data Array method "setArrayDtypeNames"
"""
data_array = self.portal.data_array_module.newContent(
portal_type="Data Array"
)
self.addCleanup(self._removeDocument, data_array)
dtype_name0, dtype_name1 = "my_dtype_name", "my_new_dtype_name"
data_array.initArray((3,), np.dtype([(dtype_name0, np.float64)]))
self.assertEqual(data_array.getArrayDtypeNames(), (dtype_name0,))
data_array.setArrayDtypeNames((dtype_name1,))
self.assertEqual(data_array.getArrayDtypeNames(), (dtype_name1,))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment