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 190194 - Code coverage marks lines untested which are executed
Summary: Code coverage marks lines untested which are executed
Status: CLOSED WONTFIX
Alias: None
Product: python
Classification: Unclassified
Component: Testing (show other bugs)
Version: 6.x
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 19:48 UTC by Tenzer
Modified: 2017-06-23 08:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot showing the bug (9.74 KB, image/png)
2010-09-06 19:48 UTC, Tenzer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tenzer 2010-09-06 19:48:08 UTC
Created attachment 101904 [details]
Screenshot showing the bug

When I do check code coverage and it comes to a simple if / else statement, it always marks the "else:" line red, even though the lines executed in the else section are green. That should mean that the "else:" line was executed, otherwise Python wouldn't have reached those lines.

See the attached screenshot, it was tested with a basic unit test of:
self.assertTrue(test_func(True))
self.assertFalse(test_func(False))

I have not tested on other platforms that Windows 7, but I presume it is cross platform. I have neither tested with 6.10, I could do that if requested.
Comment 1 Jenselme 2017-06-22 22:11:57 UTC
We are planning to work on that. This will be tracked elsewhere. Closing this old bug.
Comment 2 Jiri Kovalsky 2017-06-23 08:05:48 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.