This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cbc
Recipients Ankur.Ankan, cbc, chris.jerdonek, eli.bendersky
Date 2013-04-09.01:05:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365469515.26.0.990186381229.issue15518@psf.upfronthosting.co.za>
In-reply-to
Content
The attached patch issue-15518-1.patch replaces previous patch proposals for this issue.

The patch implements the suggestion to factor code common to report TestCase classes into a common base class BaseReportTestCase. Apologies for not having that in the previous patch.

Concerning the major point of msg186123, I had anticipated that there would need to be some discussion concerning the complexity of test data layouts and expected reports. So I have attached two visual aids to facilitate review and feedback. I made many such graphs when tracing the minimal path for complete test coverage and found them useful.

test_filecmp_layouts.rst details the directory and file layouts minimally necessary to provide complete test coverage for the report methods in filecmp.dircmp. The layouts are shown in pretty-printed os.walk format. test_filecmp_reports.rst details the reports which result from those layouts when all filecmp.dircmp report methods are exercised against them. The reports are shown as rendered by printing.

Both visual aids are laid out as tables, with TestCase names as column headers, and test_ method names within those TestCases as row headers. Both visual aids identify identical cells by an index number in the bottom right hand corner of each cell for cells that are duplicated.

The layouts table identifies six common directory and file layouts that would be necessary within a proposed filecmpdata directory. I had created these layouts in setUp methods in order to follow the pre-existing style of the test script. I agree that doing so added to the test code complexity. I agree with the suggestion to instead put the layouts in a filecmpdata directory. Before I revise the patch to do that, however, I just want in understood that there are six layouts minimally necessary in the proposed filecmpdata.

Placing the layouts in a filecmpdata directory will eliminate the need for a tearDown method in BaseReportTestCase. Placing layouts in a filecmpdata directory will faciliate the revision of the pre-existing TestCases in the script, as they use similar layouts currently created in setUp methods and modified in test_ methods.
History
Date User Action Args
2013-04-09 01:05:15cbcsetrecipients: + cbc, eli.bendersky, chris.jerdonek, Ankur.Ankan
2013-04-09 01:05:15cbcsetmessageid: <1365469515.26.0.990186381229.issue15518@psf.upfronthosting.co.za>
2013-04-09 01:05:15cbclinkissue15518 messages
2013-04-09 01:05:14cbccreate