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 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 <>
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

I used two techniques to fix these files:
1) checking if zlib was available with
       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 =

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.
Date User Action Args
2009-07-17 02:40:30ezio.melottisetrecipients: + ezio.melotti, amaury.forgeotdarc
2009-07-17 02:40:30ezio.melottisetmessageid: <>
2009-07-17 02:40:28ezio.melottilinkissue6026 messages
2009-07-17 02:40:27ezio.melotticreate