Message135497
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. |
|
Date |
User |
Action |
Args |
2011-05-07 18:05:44 | ezio.melotti | set | recipients:
+ ezio.melotti, brett.cannon, rhettinger, jcea |
2011-05-07 18:05:43 | ezio.melotti | set | messageid: <1304791543.92.0.147359913684.issue11910@psf.upfronthosting.co.za> |
2011-05-07 18:05:43 | ezio.melotti | link | issue11910 messages |
2011-05-07 18:05:42 | ezio.melotti | create | |
|