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
Add some simple test cases #15
Conversation
Can we write these as proper |
OK, I will modify 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.
I'd suggest making the diff_ndim
different for each input too. Perhaps split this into two tests, test_separation_unary
and test_separation_binary
?
src/tests/test_builtin_diffs.py
Outdated
try: | ||
with ua.set_backend(backend), ua.set_backend(udiff, coerce=True): | ||
u = np.asarray(u) | ||
u.var = udiff.Variable('u') |
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.
u.var = udiff.Variable('u') | |
u.var = udiff.Variable('u', diff_ndim=diff_ndim) |
src/tests/test_builtin_diffs.py
Outdated
u.diff_ndim = diff_ndim | ||
if v is not None: | ||
v = np.asarray(v) | ||
v.var = udiff.Variable('v') |
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.
v.var = udiff.Variable('v') | |
v.var = udiff.Variable('v', diff_ndim=diff_ndim) |
Thanks, @sangyx! |
I designed a few simple test cases based on the new derivation mechanism we discussed.