-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified Test Expectations #1311
Conversation
… isequal with sym([])"
inst/@sym/intersect.m
Outdated
@@ -98,7 +98,7 @@ | |||
%! % empty input | |||
%! A = sym([1 2]); | |||
%! C = intersect(A, []); | |||
%! assert (isequal (C, sym([]))) | |||
%! assert (isequal (size(C), [1, 0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would assert (isempty (C))
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(advantage is test would pass on both new and old sympy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would
assert (isempty (C))
work?
Yes, this too is likely to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, please make that change too then and we'll get this merged.
Please add your name to the copyright header at the top of |
yes noted, I added my name to the copyright header. |
inst/@sym/intersect.m
Outdated
@@ -98,7 +98,7 @@ | |||
%! % empty input | |||
%! A = sym([1 2]); | |||
%! C = intersect(A, []); | |||
%! assert (isequal (C, sym([]))) | |||
%! assert (isequal (size(C), [1, 0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, please make that change too then and we'll get this merged.
@cbm755 |
Thanks for this. CI failures are #1312, unrelated to this PR. |
Pull Request: Resolve Issue #1309
This pull request addresses and resolves issue #1309 by modifying test expectations in
intersect.m
to handle empty input cases correctly.Description of Changes
The approach was to adjust the expected output for a specific test case that was previously failing due to handling symbolic arrays intersected with an empty set.
Code Before
Code After
In this update, the assertion now checks that
C
has a size of[1, 0]
, aligning with the expected behavior for symbolic arrays when intersected with an empty set.Test Results
After making these changes, all tests for
intersect.m
have successfully passed, confirming the issue has been resolved:@cbm755 , could you please review this PR when you have a chance? Thank you for your time!