pyOpenSci / pyosMeta

A package that updates pyOpenSci contributor and package metadata on our website
BSD 3-Clause "New" or "Revised" License
4 stars 18 forks source link

Split utilities test file into two to match the source files #127

Closed willingc closed 7 months ago

willingc commented 7 months ago

This small PR breaks up the existing test file for utilities into two test files following the refactor in #121 and #120. No tests were changed.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 47.56%. Comparing base (1d3396c) to head (89b26eb).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #127 +/- ## ======================================= Coverage 47.56% 47.56% ======================================= Files 7 7 Lines 473 473 Branches 74 74 ======================================= Hits 225 225 Misses 244 244 Partials 4 4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

willingc commented 7 months ago

@lwasser It's fine to have 1 function in a module or 1 test in a file. I tend to lean toward separation of concepts. If we had one file called utils.py, then I would create test_utils.py (which would include all utilities). Since we split the utils into two files which makes good sense utils_clean.py and utils_parse.py, I like to match the test files to the source file. It requires less thought on my part since I know my tests are almost always in a file test_sourcefilename.py when sourcefilename.py is the code file.

willingc commented 7 months ago

Keep the great questions coming too.

lwasser commented 7 months ago

Thank you @willingc !! That makes sense!!