pytest-dev / pytest-cov

Coverage plugin for pytest.
MIT License
1.76k stars 212 forks source link

Its getting extra statement somehow. #659

Closed mohd-minhal closed 1 month ago

mohd-minhal commented 1 month ago

As the title, its basically giving 1 missing out of nowhere and not even marking.

and there are multiple files like this Screenshot 2024-09-23 203825 as you could see for some missing it didn't even marked missing.

example case Screenshot 2024-09-23 202339

My two cents : Is it the case where some portion of statement not getting test covered and its couldn't marked it because some portion is already covered.( I know it sounds dumb)

Well I wouldn't have reported an issue if it was just adding extra statement, and increases the coverage percentage but damn it's decreasing it.

mohd-minhal commented 1 month ago

Also its this https://github.com/mohd-minhal/fyle-interview-intern-backend, maybe it will help.

nedbat commented 1 month ago

I notice you are using coverage.py 5.5. That's quite old, can you try using the latest version of coverage? 5.5 didn't support Python 3.11.

mohd-minhal commented 1 month ago

Thanks man it solved it, Now I feel more dumber.