diff --git a/test/add-test.py b/test/add-test.py index d79a8d12..417fdee2 100755 --- a/test/add-test.py +++ b/test/add-test.py @@ -13,7 +13,7 @@ version = sys.version[0:3] vers = sys.version_info[:2] if sys.argv[1] in ("--run", "-r"): suffix = "_run" - assert sys.argv >= 3 + assert len(sys.argv) >= 3 py_source = sys.argv[2:] i = 2 else: diff --git a/test/bytecode_3.1_run/10_complex.pyc b/test/bytecode_3.1_run/10_complex.pyc index 8374996d..12cf424c 100644 Binary files a/test/bytecode_3.1_run/10_complex.pyc and b/test/bytecode_3.1_run/10_complex.pyc differ diff --git a/test/bytecode_3.3_run/10_complex.pyc b/test/bytecode_3.3_run/10_complex.pyc index 983188f8..6a023100 100644 Binary files a/test/bytecode_3.3_run/10_complex.pyc and b/test/bytecode_3.3_run/10_complex.pyc differ diff --git a/test/bytecode_3.5_run/10_complex.pyc b/test/bytecode_3.5_run/10_complex.pyc index 3153b002..08f0f4e8 100644 Binary files a/test/bytecode_3.5_run/10_complex.pyc and b/test/bytecode_3.5_run/10_complex.pyc differ diff --git a/test/bytecode_3.7_run/10_complex.pyc b/test/bytecode_3.7_run/10_complex.pyc index 7b24e33c..1dacf373 100644 Binary files a/test/bytecode_3.7_run/10_complex.pyc and b/test/bytecode_3.7_run/10_complex.pyc differ diff --git a/test/simple_source/bug31/10_complex.py b/test/simple_source/bug31/10_complex.py index b31478ae..b35dc2be 100644 --- a/test/simple_source/bug31/10_complex.py +++ b/test/simple_source/bug31/10_complex.py @@ -2,6 +2,8 @@ from math import atan2 # RUNNABLE! +"""This program is self-checking!""" + def assertCloseAbs(x, y, eps=1e-09): """Return true iff floats x and y "are close\"""" if abs(x) > abs(y): @@ -32,7 +34,7 @@ def check_div(x, y): assertClose(q, x) def test_truediv(): - simple_real = [float(i) for i in range(-5, 6)] + simple_real = [float(i) for i in range(-3, 3)] simple_complex = [complex(x, y) for x in simple_real for y in simple_real] for x in simple_complex: for y in simple_complex: @@ -43,7 +45,7 @@ def test_plus_minus_0j(): assert -0-0j == -0j == complex(0.0, 0.0) z1, z2 = (0j, -0j) assert atan2(z1.imag, -1.0) == atan2(0.0, -1.0) - # assert atan2(z2.imag, -1.0), atan2(-0.0, -1.0) + assert atan2(z2.imag, -1.0), atan2(-0.0, -1.0) # Check that we can handle -inf, and inf as a complex numbers. # And put it in a tuple and a list to make it harder.