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 rhettinger
Recipients brett.cannon, ezio.melotti, jcea, rhettinger
Date 2011-05-08.02:14:56
SpamBayes Score 6.6610193e-09
Marked as misclassified No
Message-id <1304820897.76.0.874177064591.issue11910@psf.upfronthosting.co.za>
In-reply-to
Content
Attaching a rough draft of a way to simplify dual path testing.  The idea is that the suite shouldn't have to be rewritten with self.module.heapify(...) references throughout.  Instead, tests are written normally and the only thing that changes in the context that they are executed in (not much different that if we simply commented out the import of c accelerator code).

Several things need work:
1) There needs to be a way to run only one block of tests if _heapqmodule isn't built.

2) the unittest.skipUnless decorator doesn't work (it does a static computation during compilation rather than a dynamic test during execution).  The attached rough draft code works around this by putting the skip logic inside the test.  This should be done more cleanly.

3) It would be great if there were a way to test unittest's test runner which version is being tested so that if there is a failure, it's obvious which context is being tested.

The patch is a proof-of-concept that would need polishing before becoming the preferred way of doing multiple path testing.
History
Date User Action Args
2011-05-08 02:14:57rhettingersetrecipients: + rhettinger, brett.cannon, jcea, ezio.melotti
2011-05-08 02:14:57rhettingersetmessageid: <1304820897.76.0.874177064591.issue11910@psf.upfronthosting.co.za>
2011-05-08 02:14:57rhettingerlinkissue11910 messages
2011-05-08 02:14:57rhettingercreate