float("Inf") in runtests.py doesn't work

RESOLVED FIXED

Status

Testing
Mochitest
P1
normal
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Gavin, Assigned: Gavin)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I:\moz\mozilla>python ff-opt/_tests/testing/mochitest/runtests.py
Traceback (most recent call last):
  File "ff-opt/_tests/testing/mochitest/runtests.py", line 419, in <module>
  File "ff-opt/_tests/testing/mochitest/runtests.py", line 194, in main
  File "ff-opt/_tests/testing/mochitest/runtests.py", line 115, in __init__
ValueError: invalid literal for float(): Inf


According to http://bugs.python.org/msg53199 , the fact that float("Inf") works at all is just a fluke, and is platform dependent. I'm using Python 2.5 on Windows.
Created attachment 309878 [details] [diff] [review]
patch
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #309878 - Flags: review?(sayrer)

Comment 2

10 years ago
Comment on attachment 309878 [details] [diff] [review]
patch

whatever Jeff is happy with. I clearly don't know whether or which Infinity works.
Attachment #309878 - Flags: review?(sayrer) → review?(jwalden+bmo)

Comment 3

10 years ago
Comment on attachment 309878 [details] [diff] [review]
patch

The web claims None and () are bottom and top values for the reals in Python, but Python mailing list traffic says this might change, and it's a touch too cute for one-off use.

>+    defaults["leakThreshold"] = float(1e3000)

You don't need the float() call if you use a floating-point exponential; r=me with that change:

>>> 1.0e3000 
inf
Attachment #309878 - Flags: review?(jwalden+bmo) → review+
Landed with that change.

mozilla/testing/mochitest/runtests.py.in 	1.20
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Priority: -- → P1
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5

Comment 5

9 years ago
Moving a bunch of Core :: Testing bugs to Testing :: Mochitest to clear out the former, which is obsolete now that we have more specialized categories for such bugs; filter on the string "MochitestMmMm" to delete all these notifications.
Component: Testing → Mochitest
Product: Core → Testing
QA Contact: testing → mochitest
Target Milestone: mozilla1.9beta5 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.