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 brian.curtin
Recipients brian.curtin, collinwinter, jyasskin, pitrou, rnk
Date 2009-11-04.18:15:46
SpamBayes Score 2.1602442e-11
Marked as misclassified No
Message-id <1257358553.33.0.350031547054.issue6292@psf.upfronthosting.co.za>
In-reply-to
Content
I've attached a patch against trunk (r76107) which I think implements
more of what Antoine is looking for. It builds on Collin's patch but
uses unittest.skipIf to skip tests which shouldn't be run with -OO. It
also checks sys.flags.optimize in DocTestSuite and returns a suite with
a single skipped test as a placeholder in the case that -OO is used.

One thing that isn't really clean is that test_docxmlrpc has two skipped
tests and requires work to be done in the tearDown method after those
methods are skipped. Since setUp gets called even when the test will be
skipped, the server is started and blocking on getting a request, so I
just figure out if the test was skipped and do a request for it. Maybe
that's acceptable, I'm not sure. If anyone has a better way to figure
get around that, I'm all ears.

For comparison's sake, regrtest with -OO on r76107 results in 297 OK and
17 failed, and without optimize it results in 311/2. The patch results
in 311 OK and 2 failed for runs of regrtest both optimized and not, and
you can see the improvements more clearly when running the module-level
tests which were modified.
History
Date User Action Args
2009-11-04 18:15:53brian.curtinsetrecipients: + brian.curtin, collinwinter, pitrou, jyasskin, rnk
2009-11-04 18:15:53brian.curtinsetmessageid: <1257358553.33.0.350031547054.issue6292@psf.upfronthosting.co.za>
2009-11-04 18:15:51brian.curtinlinkissue6292 messages
2009-11-04 18:15:51brian.curtincreate