KernelFunctions.jl icon indicating copy to clipboard operation
KernelFunctions.jl copied to clipboard

Tests checking the metric are unhelpful

Open willtebbutt opened this issue 5 years ago • 0 comments

There are quite a lot of tests that check that metric(kernel) returns a particular metric. It's not clear to me how much value these tests have.

It probably makes sense to ensure that SimpleKernels do implement metric, and return a valid type of metric, but I don't think that we should be testing that they return a specific metric, as this feels like writing a test is basically the same code as the code it's testing, which I believe generally gives a false sense of security.

I'm pro- testing that kernels yield the correct numerical values for certain specific inputs / parameters, or that they are the same as other kernels for particular settings (e.g. gamma-exponential and EQ / exponential) as with this this type of test you're typically not just writing out your source code in your tests.

What are people's thoughts?

willtebbutt avatar Sep 22 '20 21:09 willtebbutt