-
Notifications
You must be signed in to change notification settings - Fork 21
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 tests for constructing after destructing #319
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.
Thanks @jwallwork23 Generally looks sensible, couple of queries in there which may just be me not knowing pFUnit as well as you do.
Simplified unit testing in a5db1d6. |
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.
Thanks @jwallwork23 that is a lot clearer I think.
And I like the improved fixtures use - I had been wondering if something like that was possible actually!
Will approve, only final pedantic point is consider moving test_torch_tensor_delete
to the end of the tests rather than between empty
and zeros
- to me the tests for empty, zeros, and ones should be together. Matter of taste and not going to make it blocking, however.
Good point. Done in bdcf3cd. |
Thanks, feel free to merge. |
Closes #318.
This test extends the fixtures in the existing unit tests for the constructors and destructors to cover the case where
torch_tensor_delete
is called and then a constructor is applied to the same tensor.