Skip to content

Unit tests are tautological in many cases #90

@pavelkomarov

Description

@pavelkomarov

There are a lot of unit tests that just call a function and make sure the output matches some expected vector, but the values in that expected vector are awfully specific, so I suspect they were generated from the code itself. Ideally we take the derivative of a suite of known functions (maybe plus some noise) and check that the result is close enough to known derivatives, so the tests are independently correct. I do this in spectral-derivatives (see my lambdas at the top), and @andgoldschmidt and @Jacob-Stevens-Haas did this in derivatives (see funcs_and_derivatives). I'll implement something similar for this repo.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions