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 brett.cannon, ezio.melotti, jcea, rhettinger
Date 2011-05-07.18:05:42
SpamBayes Score 3.0681726e-06
Marked as misclassified No
Message-id <1304791543.92.0.147359913684.issue11910@psf.upfronthosting.co.za>
In-reply-to
Content
If they are not C specific they should be moved to the base class (TestHeap).  TestHeapC and TestHeapPython should contain only tests specific to the C and Python versions respectively.

The goal here is to make sure that they are run once with the Python version, and again with the C version -- but only if the C version is available.
Currently, if _heapq is missing, the C tests (i.e. TestHeapC) are run anyway using the Python module, when instead they should be skipped.

c_heapq = import_fresh_module('heapq', fresh=['_heapq']) should be fixed to try to import _heapq and return None if the import fails, so that a @skipUnless(c_heapq, 'test requires the _heapq module') decorator can be added to TestHeapC.
See also http://www.python.org/dev/peps/pep-0399/

This can be fixed in 2.7 first.
History
Date User Action Args
2011-05-07 18:05:44ezio.melottisetrecipients: + ezio.melotti, brett.cannon, rhettinger, jcea
2011-05-07 18:05:43ezio.melottisetmessageid: <1304791543.92.0.147359913684.issue11910@psf.upfronthosting.co.za>
2011-05-07 18:05:43ezio.melottilinkissue11910 messages
2011-05-07 18:05:42ezio.melotticreate