Skip to content
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

Merged
merged 3 commits into from May 20, 2020
Merged

Conversation

sangyx
Copy link
Collaborator

@sangyx sangyx commented May 19, 2020

I designed a few simple test cases based on the new derivation mechanism we discussed.

@hameerabbasi
Copy link
Contributor

Can we write these as proper xfail tests in PyTest?

@sangyx
Copy link
Collaborator Author

sangyx commented May 19, 2020

OK, I will modify it.

Copy link
Contributor

@hameerabbasi hameerabbasi left a 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?

try:
with ua.set_backend(backend), ua.set_backend(udiff, coerce=True):
u = np.asarray(u)
u.var = udiff.Variable('u')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
u.var = udiff.Variable('u')
u.var = udiff.Variable('u', diff_ndim=diff_ndim)

u.diff_ndim = diff_ndim
if v is not None:
v = np.asarray(v)
v.var = udiff.Variable('v')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
v.var = udiff.Variable('v')
v.var = udiff.Variable('v', diff_ndim=diff_ndim)

@hameerabbasi hameerabbasi merged commit 015b4de into Quansight-Labs:master May 20, 2020
@hameerabbasi
Copy link
Contributor

Thanks, @sangyx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants