conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
147 stars 177 forks source link

Improve testsuite #1975

Open hulkoba opened 1 month ago

hulkoba commented 1 month ago

Hello 👋!

As part of the STF work for Conda, this PR introduces several improvements to our testing framework by transitioning from unittest to pytest, leveraging pytest-mock for mocking, and adopting snapshot testing with syrupy.

Note that the testing section in the readme is updated at https://github.com/conda-forge/conda-smithy/pull/1956

Thank you!

Checklist

hulkoba commented 1 month ago

Somehow ignoring the snapshots from linting doesn't work in this branch as it does for the one on the fork https://github.com/neighbourhoodie/conda-smithy/pull/13

jcoglan commented 1 month ago

@beckermr Hi 👋 I work with @hulkoba at @neighbourhoodie and I'm following up while she's on vacation.

Your comment about snapshot testing absolutely makes sense. Do you have a list of which tests you think we should use snapshots for, and which should remain as hard-coding the expected response?

beckermr commented 1 month ago

I'd say all of them should remain hard coded.

hulkoba commented 1 week ago

Hey all :wave:

Since the snapshot testing is still discussed, I was wondering if you are still interested in the removal of unittest in favor of pytest?

If so, I could take those commits from this PR and create a new one. What do you think?

beckermr commented 1 week ago

Yes, for sure we should move to pytest!