-
Notifications
You must be signed in to change notification settings - Fork 49
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
test[next]: Add unit test for embedded inverse_image
and fix bugs
#1432
Conversation
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.
I'd like to discuss the corner cases in the 2d case (also for understanding the extension to the one with skip values.
tests/next_tests/unit_tests/embedded_tests/test_nd_array_field.py
Outdated
Show resolved
Hide resolved
@@ -632,3 +632,59 @@ def test_setitem_wrong_domain(): | |||
|
|||
with pytest.raises(ValueError, match=r"Incompatible 'Domain'.*"): | |||
field[(1, slice(None))] = value_incompatible | |||
|
|||
|
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.
maybe also add a testcase with a 2D connectivity?
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.
To be honest I don't really understand if it makes sense to restrict the connectivity in that case. I have to think about it.
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.
note to myself:
Start from this case and look at corner cases
E_START, E_STOP = 0, 1
V_START, V_STOP = 0, 1
e2v_conn = common._connectivity([0,1], domain=domain(named_range(E,1), named_range(E2V, 2)))
the inverse image is probably
domain(named_range(E,0), named_range(E2V, 1))
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.
I've added some cases to test 2d connectivities
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.
👍
Add unit test for
ConnectivityField.inverse_image()
.