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 mark.dickinson
Recipients chuck, mark.dickinson, ned.deily, ronaldoussoren
Date 2009-10-05.08:36:11
SpamBayes Score 0.0038303246
Marked as misclassified No
Message-id <1254731773.14.0.16873031633.issue7042@psf.upfronthosting.co.za>
In-reply-to
Content
> If this is about passing time, there should be better ways (than
> those which break if your computer gets faster).

Agreed.  The challenge is to find ways that don't add too much in the
way of extra complexity, fragility, or dependencies to the unit test.

How about replacing the xrange(100000000) loop with something like this,
which allows 30 seconds of real time and then fails with a timeout 
message:

start_time = time.time()
while time.time() - start_time < 5.0:
    <use some process time here>
    if signal.getitimer(self.itimer) == (0.0, 0.0):
        break
else:
    self.fail('timeout waiting for virtual timer signal')
History
Date User Action Args
2009-10-05 08:36:13mark.dickinsonsetrecipients: + mark.dickinson, ronaldoussoren, ned.deily, chuck
2009-10-05 08:36:13mark.dickinsonsetmessageid: <1254731773.14.0.16873031633.issue7042@psf.upfronthosting.co.za>
2009-10-05 08:36:12mark.dickinsonlinkissue7042 messages
2009-10-05 08:36:11mark.dickinsoncreate