Skip to content

Commit d0a9e88

Browse files
Kevin Gurneysgilmore10
andcommitted
Add test cases to verify Feather V1 deprecation warnings.
Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
1 parent e9c2825 commit d0a9e88

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

matlab/test/tfeather.m

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,29 @@ function UnicodeVariableNames(testCase)
273273
testCase.verifyEqual(actualTable, expectedTable);
274274
end
275275

276+
function VerifyFeatherReadDeprecationWarning(testCase)
277+
filename = fullfile(pwd, 'temp.feather');
278+
279+
t = array2table([1, 2, 3]);
280+
featherwrite(filename, t);
281+
282+
warning("on", "arrow:io:feather:v1:FeatherReadDeprecated");
283+
fcn = @() featherread(filename);
284+
testCase.verifyWarning(fcn, "arrow:io:feather:v1:FeatherReadDeprecated")
285+
warning("off", "arrow:io:feather:v1:FeatherReadDeprecated");
286+
end
287+
288+
function VerifyFeatherWriteDeprecationWarning(testCase)
289+
filename = fullfile(pwd, 'temp.feather');
290+
291+
t = array2table([1, 2, 3]);
292+
293+
warning("on", "arrow:io:feather:v1:FeatherWriteDeprecated");
294+
fcn = @() featherwrite(filename, t);
295+
testCase.verifyWarning(fcn, "arrow:io:feather:v1:FeatherWriteDeprecated")
296+
warning("off", "arrow:io:feather:v1:FeatherReadDeprecated");
297+
end
298+
276299
end
277300
end
278301

0 commit comments

Comments
 (0)