Patches item #1550272, was opened at 2006-09-01 03:44 Message generated for change (Comment added) made by jjlee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1550272&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: Tests Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Collin Winter (collinwinter) Assigned to: Nobody/Anonymous (nobody) Summary: Add a test suite for unittest Initial Comment: This file replaces the current version Lib/test/test_unittest.py, which only contains a single test. The attached suite contains 128 tests for the mission-critical parts of unittest. A patch will follow shortly that fixes the bugs in unittest uncovered by this test suite. ---------------------------------------------------------------------- Comment By: John J Lee (jjlee) Date: 2007-01-30 02:15 Message: Logged In: YES user_id=261020 Originator: NO Oh the irony. :) This is good stuff. I have not reviewed the whole patch, but sampling bits of it it looks fine. No great danger in committing this, so why not let's commit it? Of the following points, I think only the first should block commit of this patch. Any comments on that first point? 1. test_loadTestsFromName__module_not_loaded() and test_loadTestsFromNames__module_not_loaded() -- these may break in future, and may break e.g. only when running tests in random order, which is sometimes done when debugging obscure stuff. Better to introduce a module of your own in Lib/test that's guaranteed not to be loaded already -- maybe test_unittest_fodder.py . Still, that wouldn't help the case where somebody is running the tests in a loop, which would cause failures already (again, this is something people do as part of bug detection / removal). I don't know the import internals and I hear they're messy, but perhaps just del sys.modules[module_name] at the start of each of those two methods is at least an improvement over what they do now. 2. Would be helpful to list what remains to be tested (for example, there is no test of assertRaises) 3. Why no use of .assertRaises? 4. Would be nice to resolve some of the XXXes, but I realise that this may be difficult/impossible given the requirement for backwards-compatibility ---------------------------------------------------------------------- Comment By: Collin Winter (collinwinter) Date: 2006-09-01 03:52 Message: Logged In: YES user_id=1344176 That promised patch for unittest is #1550273. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1550272&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches