Author ezio.melotti
Recipients amaury.forgeotdarc, ezio.melotti
Date 2009-07-17.02:40:25
SpamBayes Score 1.2208e-12
Marked as misclassified No
Message-id <1247798430.02.0.221393149417.issue6026@psf.upfronthosting.co.za>
In-reply-to
Content
The 3 new failures (test_multiprocessing, test_xmplrpc and
test_docxmlrpc) were introduced in r73638 and I opened a new issue about
that (#6499). I'll wait to see if and how they should be fixed (and
possibly open a new issue for them).

The attached patch fixes test_zipfile, test_zipimport, test_gzip and
test_distutils.

I used two techniques to fix these files:
1) checking if zlib was available with
   try:
       import zlib
   except ImportError:
       zlib = None
   and then using @skipUnless(zlib, "requires zlib")
   to skip individual tests/classes
2) using zlib = test_support.import_module('zlib') when
   zlib (or other modules like gzip) was necessary for
   all the tests

The patch includes the following fixes:

In test_zipfile there were 5 tests that were failing. Several other
tests work without zlib too. Fixed adding 3 @skipUnless(zlib, "requires
zlib") to two methods and to the TestsWithMultipleOpens class.

In test_zipimport there are 3 test classes. The 3rd class tests various
errors that are raised when, for example, the file doesn't exists. This
class works without zlib too, but since it's pointless to run it if the
other two don't work I decided to skip everything. Fixed adding zlib =
test_support.import_module('zlib').

In test_gzip all the files require gzip to work, and gzip requires zlib.
Fixed adding gzip = test_support.import_module('gzip').

In test_distutils there are several files affected:
test_sdist: fixed with 4 @skipUnless(zlib, "requires zlib")
test_bdist_dumb: fixed with a @skipUnless(zlib, "requires zlib")
test_archive_util: fixed with 3 @skipUnless(zlib, "requires zlib")

If the patch is good I'll commit it.
History
Date User Action Args
2009-07-17 02:40:30ezio.melottisetrecipients: + ezio.melotti, amaury.forgeotdarc
2009-07-17 02:40:30ezio.melottisetmessageid: <1247798430.02.0.221393149417.issue6026@psf.upfronthosting.co.za>
2009-07-17 02:40:28ezio.melottilinkissue6026 messages
2009-07-17 02:40:27ezio.melotticreate