forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-38652: [MATLAB] Add tests about time precision preservation …
…when converting MATLAB duration to `arrow.array.Time32Array` and `arrow.array.Time64Array` (apache#38661) ### Rationale for this change The current conversion from MATLAB duration to `arrow.array.Time32Array` and `arrow.array.Time64Array` loses time precision, and there is no test to cover such limitation. It is best practice to have tests cover software design. In addition, such tests will be helpful to evaluate the impact in the future when we improve the design. ### What changes are included in this PR? I mainly added three test cases for each of `arrow.array.Time32Array` and `arrow.array.Time64Array`. - Updated the basic test case to verify both class and value. In the MATLAB interface tests, we would like to verify the value to make sure there is no precision loss. The basic test case will serve as a test example when people learn to write tests. Updating the basic test case will set a good example for contributors to learn. - Test the default value of "TimeUnit". - Test the functionality of "TimeUnit". ### Are these changes tested? No software change. The updated test files passed on my local machine. ### Are there any user-facing changes? No * Closes: apache#38652 Authored-by: Lei Hou <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
- Loading branch information
1 parent
971bf38
commit 1fd11d3
Showing
2 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters