New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add figleaf coverage metrics #46655
Comments
This issue adds support for figleaf unit test coverage information. The |
To test:
The script will download figleaf, then run regrtest.py. Any extra stuff |
Thanks for the patch. It would be nice to get more instrumentation like Here are some things I noticed while reviewing the patch:
BTW, does figleaf work on Windows? |
Thanks for the input.
Uploading a new version of the .zip file that uses sys.executable and I don't know if figleaf works on windows and I don't have a system to |
At 69kb, nah. It should be good enough for the first cut.
Oh sorry, I only meant to remove the import since it wasn't used. I |
How will this work if I use a build directory? For example, % pwd
/Users/skip/src/python/trunk/build
% ./python.exe ../Tools/coverage/coverage.py
Running tests...
Traceback (most recent call last):
File "figleaf-latest/bin/figleaf", line 4, in <module>
figleaf.main()
File
"/Users/skip/src/python/trunk/build/figleaf-latest/figleaf/__init__.py",
line 302, in main
execfile(sys.argv[0], __main__.__dict__)
IOError: [Errno 2] No such file or directory: '../../Lib/test/regrtest.py'
Generating html...
CANNOT OPEN: @test
figleaf: HTML output written to ../../coverage I think this mode should work. I prefer not to pollute my Skip |
I gave this a try. It seems to not report on many files. For example, Skip |
Re-attaching the coverage bootstrapping file as plain/text. |
IIUC, using runpy (either from Python or in a subprocess i.e. python -m test.regrtest) would allow running from build dir. Coverage reports are nice, but I personally dislike the idea of code downloading something via HTTP and running it. I’d prefer just having an optional dependency on it and letting the user install it if they want. Code review:
Hope this helps! :) |
the Python API of figleaf* |
Adding people interested in code coverage to nosy. |
The devguide reports a long section about code convering cpython: http://docs.python.org/devguide/coverage.html . It uses Ned's coverege.py and has a lot of details about how to use it and how to generate nice reports out of it. do we need an internal tool for cpython coverage? |
Indeed, the devguide documents how to use coverage.py, and there is even a pure-stdlib solution with regrtest. I recommend closing this. |
As there have been no replies to msg213358 can someone close this please. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: