Patches item #1429818, was opened at 2006-02-11 15:22
Message generated for change (Comment added) made by jimjjewett
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1429818&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Marius Gedminas (mgedmin)
Assigned to: Nobody/Anonymous (nobody)
Summary: trace.py needs to know about doctests

Initial Comment:
SchoolTool's test runner uses the 'trace' module to
produce unit test coverage reports.  Many unit tests in
SchoolTool are actually doctests.  When the test runner
invokes trace.CoverageResults.write_results, it gets a
lot of printed error messages like this:

  Not printing coverage data for '<doctest
schooltool.app.browser.tests.test_app.doctest_ACLView[60]>':
[Errno 2] No such file or directory: '<doctest
schooltool.app.browser.tests.test_app.doctest_ACLView[60]>'

and a lot of empty files with nimes like

  <doctest schooltool.timetable.browser.cover

appear in the output directory.

The attached patch fixes both problems.

----------------------------------------------------------------------

Comment By: Jim Jewett (jimjjewett)
Date: 2006-02-15 11:20

Message:
Logged In: YES 
user_id=764593

Do I understand this correctly, then

(1)  doctests are still run, and contribute to coverage

(2)  The code that creates a test should not be measured for 
coverage. ???

(3)  Because doctests are in the same file as the code, 
rather than the other tests, they get mistaken for code 
whose own coverage should be measured.

If so, it seems like the right solution is to add a 
subdirectory for test-portions-that-didn't-run, and put 
doctests there instead of in the main directory.  

Or are you saying that is OK if some of the tests (and some 
of the doctests) don't actually run in full?

-jJ


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1429818&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches

Reply via email to