Hello! I am happy to announce a little project of mine called SimpleMock.jl.
It has a really simple API to help you test non-deterministic or hard-to-replicate function behaviours like randomness, networking, etc.
using SimpleMock f(args...) = get(args...) mock(get) do g f(1) # Would normally throw a `MethodError` for `get`. @assert called_once_with(g, 1) end
It’s implemented with Cassette, and I had lots of fun learning about how that works—I feel like I’ve reached the next level of Julia with that knowledge.
You can browse the short-but-comprehensive documentation here. Feel free to give it a try!