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 zach.ware
Recipients brett.cannon, ezio.melotti, zach.ware
Date 2013-04-10.18:40:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a patch for test_tarfile.py discovery.

There are a couple of inheritance issues resolved; CommonReadTest (and its children, MiscReadTest and StreamReadTest) are changed simply to avoid running the tests in CommonReadTest on their own--they pass, but are unnecessary.  LongnameTest and WriteTestBase cause failures when run on their own, so they no longer inherit from unittest.TestCase.

test_main() has been replaced by setUpModule, some skip decorators, and tearDownModule.  HardlinkTest and LinkEmulationTest are given skipUnless and skipIf decorators, respectively, instead of simply being appended to 'tests' or not.  This does change the test count; on my machine it adds the 4 tests skipped in LinkEmulationTest, raising the total from 307 to 311.  gzip, bz2, and lzma setup has been moved into setUpModule, and each group of those tests now has a new dummy base class with a skip decorator.  This will also change test counts on machines that don't have gzip, bz2, or lzma available.  tearDownModule replaces the finally clause at the end of test_main().

A simpler patch would just convert test_main into load_tests and add a tearDownModule function to replace the finally clause of test_main(), but I believe this slightly more invasive approach is more correct and should simplify future maintenance of the module.

Thanks,

Zach
History
Date User Action Args
2013-04-10 18:40:49zach.waresetrecipients: + zach.ware, brett.cannon, ezio.melotti
2013-04-10 18:40:49zach.waresetmessageid: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za>
2013-04-10 18:40:49zach.warelinkissue17689 messages
2013-04-10 18:40:48zach.warecreate