MDAnalysis / UserGuide

User Guide for MDAnalysis
https://userguide.mdanalysis.org
22 stars 33 forks source link

document `assert_allclose` and `pytest.approx` #234

Open IAlibay opened 1 year ago

IAlibay commented 1 year ago

Since these are the favoured assertion methods for the core library, we should document these in testing.rst.

jandom commented 1 year ago

This ticket sounds very similar to https://github.com/MDAnalysis/UserGuide/issues/171 – what's the difference? pytest.approch?

IAlibay commented 1 year ago

@jandom yeah the addition here is pytest.approx. MDAnalysis recommends using approx for single float comparisons and allclose for arrays (it's purely a speed thing, allclose on single numbers is very slow).