This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 165847

Summary: Code coverage does not handle multiple files
Product: python Reporter: saluk <saluk>
Component: TestingAssignee: Torbjorn Norbye <tor>
Status: CLOSED WONTFIX    
Severity: blocker CC: Jenselme
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description saluk 2009-05-22 18:03:17 UTC
Most programmers write tests in separate files than the modules they are testing, and often (though maybe this is not
totally recommended) a unit test will test code that hits more than a single file.  Currently, the code coverage does
not trace, making it impossible to use for a complex project. I want to see results updated for imported files as well.
Comment 1 saluk 2009-05-22 18:09:23 UTC
False alarm! I had a file which was using coverage.py before trying the netbeans coverage tool (before they were
implemented).  In my script, I had a coverage.stop() line, which was apparently canceling the netbeans coverage.  Sorry
for the noise, I'm not sure if this is something that needs to be mentioned (don't use other coverage tools if you are
using netbeans coverage), or if the conflict could/should be resolved.
Comment 2 Torbjorn Norbye 2009-05-22 18:13:55 UTC
Maybe we should change our coverage script to use more unique names (e.g. prepend nb_ or netbeans_ to all the symbol
names) to make conflict less likely?

Patches anyone?
python.editor/scripts/coverage.py
python.editor/scripts/coverage_wrapper.py
python.editor/src/org/netbeans/modules/python/editor/codecoverage/PythonCoverageProvider.java

;-)
Comment 3 Jenselme 2017-06-22 21:48:43 UTC
Launching tests will need rework. Will test and fix when we do this. Will be tracked elsewhere. Closing this.
Comment 4 Jiri Kovalsky 2017-06-23 08:06:19 UTC
Thanks for your evaluation Julien. Reporter, if you think your issue is still valid and needs to be addressed, don't hesitate to reopen it with additional information. Closing for now.