Fix deepcopy of Dict, Set, and others that are supported by DeepDiffs.jl - #17
Open
Teo-ShaoWei wants to merge 1 commit into
Open
Fix deepcopy of Dict, Set, and others that are supported by DeepDiffs.jl#17Teo-ShaoWei wants to merge 1 commit into
Dict, Set, and others that are supported by DeepDiffs.jl#17Teo-ShaoWei wants to merge 1 commit into
Conversation
…pecific implementation of ssfrr#10, e.g. ``` julia> @testset ExtendedTestSet "begin" begin @test Dict(1 => 2) == Dict(2 => 2) end ===================================================== begin: Test Failed at REPL[5]:2 Expression: Dict(1 => 2) == Dict(2 => 2) Evaluated: Dict(1 => 2) == Dict(2 => 2) <redacted>... ``` This PR will attempt to fix comparing of `Dict`, `Set`, etc while keeping the rest of the vectors and so on working. ``` julia> @testset ExtendedTestSet "begin" begin @test Dict(1 => 2) == Dict(2 => 2) end ===================================================== begin: Test Failed Expression: Dict(1 => 2) == Dict(2 => 2) Diff: Dict( - 1 => 2, + 2 => 2, ) <redacted>... ``` We achieved this by reverting to the implementation before the change. That is, to just evaluate regardless of what the LHS and RHS are in a `@test LHS == RHS` statement. There is one con, which is that `deepdiff` currently doesn't compare everything sufficiently well yet, especially if the objects are not part of the Julia base. This however should be an improvement that we will want to delegate to [DeepDiffs.jl](https://github.com/ssfrr/DeepDiffs.jl), which is good as that gives us a new good reason to help make improvement to that project 💪
Dict, Set, etc due to the s…Dict, Set, and others that are supported by DeepDiffs.jl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation breaks for
Dict,Set, etc due to the specific implementation of #10, e.g.This PR will attempt to fix comparing of
Dict,Set, etc while keeping the rest of the vectors and so on working.We achieved this by reverting to the implementation before the change. That is, to just evaluate regardless of what the LHS and RHS are in a
@test LHS == RHSstatement. There is one con, which is thatdeepdiffcurrently doesn't compare everything sufficiently well yet, especially if the objects are not part of the Julia base. This however should be an improvement that we will want to delegate to DeepDiffs.jl, which is good as that gives us a new good reason to help make improvement to that project 💪