NNPDF / pineappl

PineAPPL is not an extension of APPLgrid
https://nnpdf.github.io/pineappl/
GNU General Public License v3.0
13 stars 3 forks source link

implementing pytests #38

Closed scarrazza closed 4 years ago

scarrazza commented 4 years ago

This completes the python wrapper with pylint and pytest.

cschwan commented 4 years ago

Does the test allow for small variations around the numerical values? See for instance the rust test case, https://github.com/N3PDF/pineappl/blob/1e9b13e248318de3943f5bcb6674a34d87e5cc7d/pineappl/tests/drell_yan_lo.rs#L204-L206 where I allow for a variation of 16 ULPS. If you just comparing the standard output, you could simply print and compare less digits.

scarrazza commented 4 years ago

I am using the numpy assert all close with rtol=1e-5 here, I believe this should be enough.

cschwan commented 4 years ago

I see; in that case you can make the test even stricter, something around 1e-12?

scarrazza commented 4 years ago

This should be ready now.

cschwan commented 4 years ago

OK, merge it!