Closed znicholls closed 1 year ago
I'm going to use this fix to avoid the terminal width issue https://github.com/pytest-dev/pytest/issues/4030#issuecomment-428705472
Adding the doctests breaks the code coverage. I think there is a fix for this, but I don't know what it is (maybe a non-editable install) and I'm giving up for the day.
All modified lines are covered by tests :white_check_mark:
Comparison is base (
bf80b14
) 95.15% compared to head (657eab8
) 95.15%. Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Adding the doctests breaks the code coverage. I think there is a fix for this, but I don't know what it is (maybe a non-editable install) and I'm giving up for the day.
This discussion is incredibly helpful for debugging these kind of issues.
tl-dr; something like COVERAGE_DEBUG=trace poetry run pytest src --doctest-modules --cov=scmdata -s
or COVERAGE_DEBUG=trace COVERAGE_DEBUG_FILE=/Users/znicholls/Desktop/dbg.out poetry run pytest src --doctest-modules --cov=scmdata
is super helpful because you can see what isn't being traced.
For whatever reason, coverage thinks that the modules that have the doctests in them aren't in the source scope for some reason unless we specify --cov=src
. I was getting output like the below
Not tracing '/Users/znicholls/Documents/repos-agcec/scmdata/src/scmdata/groupby.py': module 'src.scmdata.groupby' falls outside the --source spec
I have no idea why this happens, something to do with these lines
Pull request
Please confirm that this pull request has done the following: