SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
709 stars 109 forks source link

tests: improve the test suite implementation #429

Closed perillo closed 5 months ago

perillo commented 5 months ago

This is the first of a series of PR to improve the test suite readability and reliability.

Most of the code change has be done automatically. Also note that some change are not optimal, but I avoided manual changes.

Since review will be very hard and you should not trust me, I suggest to @SimonKagstrom that

Only merge the first commit. Add a commit for each of the following commands:

> ruff format tests/tools
> ruff format tests/tools/run-tests
> ruff check --fix tests/tools
> ruff check --fix tests/tools/run-tests
> ruff format tests/tools
> ruff format tests/tools/run-tests

I used ruff 0.3.3 but it should be ok to use a different version.

Formatting the code will make future changes more easy. As an example, I plan to change how the command line is created for subprocess. Currently is is a string, where arguments are concatenated together; it is terrible!

codecov[bot] commented 5 months ago

Codecov Report

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

Project coverage is 65.68%. Comparing base (49635e7) to head (2d48999).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #429 +/- ## ======================================= Coverage 65.68% 65.68% ======================================= Files 58 58 Lines 4514 4514 Branches 4171 4171 ======================================= Hits 2965 2965 Misses 1549 1549 ```

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

SimonKagstrom commented 5 months ago

I'm OK with merging all of it at once, it's still separated into commits, or did I misunderstand you?

Thanks for doing this!

perillo commented 5 months ago

I'm OK with merging all of it at once, it's still separated into commits, or did I misunderstand you?

Thanks for doing this!

What I mean is that this is a big change. Personally I would feel insecure about merging a pull request like this. Thanks for the trust!

SimonKagstrom commented 5 months ago

Well, I looked at the commits, and since it only affects the testsuite (which also runs fine), I'm not too worried!