Skip to content

Deprecate TensorProduct correctly #243

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

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Conversation

devmotion
Copy link
Member

This PR corrects the deprecation of TensorProduct and makes sure that dispatches on TensorProduct still work correctly. Unfortunately, I learnt about Base.@deprecate_binding too late (see also #242).

@test (@test_deprecated TensorProduct((k1, k2))) == k1 ⊗ k2
@test (@test_deprecated TensorProduct([k1, k2])) == k1 ⊗ k2
@test TensorProduct === KernelTensorProduct
@test TensorProduct(k1, k2) == k1 ⊗ k2
Copy link
Member Author

@devmotion devmotion Jan 20, 2021

Choose a reason for hiding this comment

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

Deprecated bindings can't be tested with @test_deprecated, @test_warn, or @test_logs it seems. But I think these tests should be sufficient since TensorProduct is only defined in src/deprecated.jl.

@devmotion devmotion merged commit 3fca6fc into master Jan 20, 2021
@devmotion devmotion deleted the dw/tensorproduct_deprecation branch January 20, 2021 18:33
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.

2 participants