JuliaDiff / JuliaDiff/ChainRulesTestUtils.jl
check_equal for DoesNotExist
Open
Nobody has claimed this yet.
good first issue
- Dominant language
- Julia
- Stars
- 50
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
We have check_equal for Zero() but not for DoesNotExist(), which currently breaks
julia> check_equal(2.0, DoesNotExist())
ERROR: MethodError: no method matching length(::DoesNotExist)
...
julia> check_equal(Zero(), DoesNotExist())
ERROR: StackOverflowError:
...
We should probably have DoesNotExist() be equal to itself, and nothing else
check_equal(::DoesNotExist, x; kwargs...) = @test false
check_equal(x, ::DoesNotExist; kwargs...) = @test false
check_equal(x::DoesNotExist, y::DoesNotExist; kwargs...) = @test true
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the check_equal entry point and compare its existing handling of Zero() with the reported DoesNotExist() cases. Reproduce the two examples, then verify that comparisons involving DoesNotExist() behave as described and that the existing check_equal behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100