ryantibs / quantgen

Tools for generalized quantile modeling
https://ryantibs.github.io/quantgen
14 stars 9 forks source link

Update custom snapshot tests to allow any relation, have git-helping nonces #24

Open brookslogan opened 1 year ago

brookslogan commented 1 year ago

Allow forwarding of parameters or any sort of reflexive relation instead of just expect_identical and expect_equal with custom snapshot tests. Then use it to apply a tolerance to prevent the false positives from #22. Also update the way the nonces work; require the user to specify one from the start and keep it there in the test code; to update, they must change it to a new value; this way, whenever a snapshot is updated, it should require be clear from looking at the git diffs of the testing code (and only require a single test run rather than a with-nonce and no-nonce run). [I have some code toward this.]