was not handling 2.4 "if not"...

As the late Danny Gumport used to say: "not"'s can turn you into
knots.

Also go over 2.4 runtest failures
This commit is contained in:
rocky
2019-12-09 05:57:50 -05:00
parent 34957487f0
commit 827bd32a67
4 changed files with 13 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ PYTHON_VERSION = sys.version_info[0] + (sys.version_info[1] / 10.0)
x = 1e300
assert 0.0 == x * 0
assert x * 1e300 == float("inf")
if PYTHON_VERSION > 2.4:
if PYTHON_VERSION > 2.41:
assert str(float("inf") * 0.0) == "nan"
else:
assert str(float("inf") * 0.0) == "-nan"

View File

@@ -34,10 +34,16 @@ case $PYVERSION in
SKIP_TESTS=(
[test_dis.py]=1 # We change line numbers - duh!
[test_grp.py]=1 # Long test - might work Control flow?
[test_pwd.py]=1 # Long test - might work? Control flow?
[test_pep247.py]=1 # Long test - might work? Control flow?
[test_pyclbr.py]=1 # Bug in checkModule()/ismethod() try confused for try-else
[test_pwd.py]=1 # Long test - might work? Control flow?
[test_pyexpat.py]=1 # Investigate
[test_queue.py]=1 # Control flow?
# [test_threading.py]=1 # Long test - works
[test_re.py]=1 # try confused with try-else again
[test_threading.py]=1 # Line numbers are expected to be different
[test_thread.py]=1 # test takes too long to run: 36 seconds
[test_trace.py]=1 # Long test - works
[test_zipfile64.py]=1 # Runs ok but takes 204 seconds
)
;;
2.5)
@@ -49,7 +55,7 @@ case $PYVERSION in
[test_pdb.py]=1 # Line-number specific
[test_pwd.py]=1 # Long test - might work? Control flow?
[test_queue.py]=1 # Control flow?
[test_re.py]=1 # Probably Control flow?
[test_re.py]=1 # Possibly try confused with try-else again
[test_trace.py]=1 # Line numbers are expected to be different
[test_zipfile64.py]=1 # Runs ok but takes 204 seconds
)

View File

@@ -71,6 +71,9 @@ def customize_for_version(self, is_pypy, version):
TABLE_DIRECT.update(
{"except_cond3": ("%|except %c, %c:\n", (1, "expr"), (-2, "store"))}
)
if version <= 2.6:
TABLE_DIRECT["testtrue_then"] = TABLE_DIRECT["testtrue"]
if 2.4 <= version <= 2.6:
TABLE_DIRECT.update({"comp_for": (" for %c in %c", 3, 1)})
else:
@@ -134,7 +137,6 @@ def customize_for_version(self, is_pypy, version):
}
)
if version == 2.4:
def n_iftrue_stmt24(node):
self.template_engine(("%c", 0), node)
self.default(node)