desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
19 stars 23 forks source link

Refresh test infrastructure #799

Closed weaverba137 closed 2 years ago

weaverba137 commented 2 years ago

This PR closes #798 by refreshing the test infrastructure.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+11.6%) to 56.294% when pulling dd577ce79f902bae6758f75597ac0477bf7acc7d on refresh-tests into c5e89faf444375db72d77d284d4da49227be8600 on main.

weaverba137 commented 2 years ago

@geordie666, I think I found the answer: pytest>=7 and pytest-cov>=4 give lower coverage than pytest<7; pytest-cov<4 which is what we have at NERSC. I've pinned to those older versions, and the coverage value now matches the NERSC value.

desitarget/svX/svX_cuts.py is imported by importlib.import_module instead of a standard import statement, & this seems to be incompatible with how recent versions of pytest-cov counts coverage. Further research will be needed to fix this long-term, but for now pinning the versions works.

weaverba137 commented 2 years ago

I don't actually need to tag this immediately, so go ahead and tag based on your own changes when you're ready.