evanberkowitz / supervillain

MCMC for modified Villain constructions
https://supervillain.readthedocs.io/
Other
0 stars 0 forks source link

Use pytest #133

Closed evanberkowitz closed 5 months ago

evanberkowitz commented 5 months ago

At the CASA-JuRSE Hackathon on Testing I learned to use pytest. To take advantage of some standardized packaging and coverage reporting that pytest can provide, I converted my tests.

I should probably learn to use the fixtures correctly, though it is not immediately clear how to get the exact caching behavior I want.

I currently have 64% coverage; the biggest offenders are misses in

The most obvious missing test is to do a test calculation on both sides of the duality and to do some sort of statistical comparison. But of course the test shouldn't fail if eg. only one observable comes out 1σ different. A true puzzle as to how to test it without being too sensitive to statistical fluctuations.

Thanks to @jakob-fritz for his help.