From bc71bf7acde61391aa1682e62f0231059dea9bb9 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 3 Apr 2022 06:41:58 -0400 Subject: [PATCH] Shorten 10_complex.py Runtime testing took too long because ranges were larger than needed Also use newer convention for marking runable codes --- test/add-test.py | 2 +- test/bytecode_3.1_run/10_complex.pyc | Bin 2009 -> 2774 bytes test/bytecode_3.3_run/10_complex.pyc | Bin 2152 -> 2345 bytes test/bytecode_3.5_run/10_complex.pyc | Bin 1635 -> 1687 bytes test/bytecode_3.7_run/10_complex.pyc | Bin 1915 -> 1530 bytes test/simple_source/bug31/10_complex.py | 6 ++++-- 6 files changed, 5 insertions(+), 3 deletions(-) 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 8374996d0b02b893266f31823ed880d2d8c850fb..12cf424c680f3eb9c8cf01999def74f3289d7cfc 100644 GIT binary patch delta 942 zcmZuv%Wl&^6g}6kiGv#;D&15d76l?@)5o$Ks)_|dDo98yBC5)*t>Pw5O2(EbYUPNO z1#55l0#=}~VgoBa0SSqZ=ntT9XVNrQ@H~$1oH^sU=i0xo|GJeu^%kn5^zr@y3eDp9 zAy4_9A>cvi05PFOpuj+2;+z*8@UV1jBCv4|v@8UU4r~NM2M&U3cxj*|(5fI52t2eM zNFRy2g?FT=u!6P;DVfrYjUhmxqaQ&P&l?MzO2iWlVn}TUKk>WkU-oy2#OMbt6WtvB zF$P3Sqg`v0>i1Y84F(s{-|=`HnfWLCC*99qJ0EE!uZgAX%C(X?Jh#=EuMBLNhh?@6 z^zI^ILc1LrV5V!pAlXDhDp|I9C4EvZeKD0*R3XlQGeTk@I|Yt(<@mk4R(G&-eTV#T zd4~B@n#ts6#Vaw_Rf~s{EWkx_IrE(phGH8WPFK2qh3#yzak+o-eJUIjG!scf73e>9 zo)|RLpOXrPgI;{x3E!kOj<=)?`$^R6KI->-{n@8Wmz6w<{X_lwRNe7*ZSq*p?^tVD zotY$*$=-1%m3wj2Wn4XKGApYLpeA>Z9?)DS7vp&%+bOe9qASWa)E%mo=~M!#G7$U8 ttC^{MQ*5u4=RIfe87->gP)_r2!n>{f%SDD8wpaCRx8@4h^{CEW&_6kbl0^Uj delta 239 zcmca6dXqoNpNE&LG2v%yG6ND|0_Gh+55zJuvTT-Pl4fM&+ib<$z{n`Pc{htS zqmUBF3Xol#44J?G|No!KHkpI%7^Cv!^K5hU6hV@FK!Sl$l2MG2oq-LED?uU%@ZrCo n1}l&|`7ft48_1|Cqsir5PQoleW-%9#;Njw7<>cdJXJZ5a$HFF= diff --git a/test/bytecode_3.3_run/10_complex.pyc b/test/bytecode_3.3_run/10_complex.pyc index 983188f8291ac076681633aaa0098b9abbe86378..6a023100ab8afe4ef1964e5cfdd0d397292b4cb9 100644 GIT binary patch delta 718 zcmZuuJxE+Z5dLQ0-`)AVKY|iSsu+0?Fls3%f=OWtQLZ}za^7C_f+q*>UJ*g=;10x2 z9c&W_q)44QWvo-Bl$6?82ZEV-@uCKYouB=7cIMmJ^Wx`n_kB2;`;shg%=prgb~;fJ%I2zUA*;=7QU!F+OxFxeXKOLP^I!Ypo=5N06PiTU>!IN%Xpj7lsHRWBD zK&s0~_JBPpt1MgrSKf)aBSWBfjrP)~4$*(9L*OP&kD{`+Ow{bo{B^Uu=FZHO1?e>6 z&U$-0iPu}r9kJ7Ip9vZ(4LG4m?$6T-g^e>1We0OpY=`i!oJHzun&odvNrZ2AUzpqc$4qyJ-EG)ps zKh30kg+}^_LO`7%Ffd~1jF%lS)Xy75;)DiFw z2+Ma+p|!>;>a+EMHPyPk?ARn4IqHr5b#ji}qM8DND=Y-uoC;$Ke diff --git a/test/bytecode_3.5_run/10_complex.pyc b/test/bytecode_3.5_run/10_complex.pyc index 3153b0028cf46ba3c0ce24a8e877a916d9edc5a2..08f0f4e816a66d12a52b20e1dc557968234b58c5 100644 GIT binary patch delta 671 zcmY+AL2DC16vzK>c6K+L?zX9dp|x6tYFUb)1#eX@gG%LI>y)8U#`T%7cbr7_~Iff*-FKxrn6NqYZc}>J*Lon zrj~CP$*hS7G;7|9uTvA7&Azuzm&`ZsX`PjL7z#WZ5ZkX@# z7J25Ue4pIpn+m~*aPrHH{JZ@+C%VEI$7NoW%~JPr)qb;NH&z*-1)8ITKRwUcOIxyL z53&A`y{Iu*20y|faLD&tt#b1Rm;bZ#!r*UpkoJYX%!yvG2pOpui-SAtt1dl*(|5t? z+w1g-X1Be=y#0EGe<&maUM%z?&*wMT8ry0ApNN4g;PiJY^mUH)HAcD}jb%40UuoNm xjx1se+mUP7ovN?c^s0r`I02`uvew;Iy-t4L9^xLO=Fe1T{CGMJ<0$q*`U9FFZ&3gM delta 623 zcmZuv&ubGw6n<}JvuV@aMCqZGii{D21lxir3KD72AbRM*-U4FM?8Jt~q|8oacd5jf zf{Ldyh<}53@lWvX#lv2EX>PrWpuX84iumTekM};_FCO#WKlVmTzF!zOzdec_fMfVe zIQbi7;XQ(Y6d_=6h|rjY90Df`iO)gc!XZF|L6C=FF7qj20U8cS4if+j3b0-Ap1k{d z`D9`3?CrMg4{-FUgyW;n&5;H;AVpXvTbUpnFxaE%&p{)+%w}&_cv5{R^-%SNRzoSe zosQ`A1}zk)`E|$$LXVuM7-PAQ*=e2){+>jB>!}PoP;au-6Q=sMuQcufJKep!!y3a1! z!~y}}c|3nyQ7M)=O0uX{kNvr7mby5F`ldO<1GtXq%9TdapvU+Q;y1yoq$q!3?v7;xa3{}3((|v063~|oX z5PMx_d>8XLrqtXro+G$IE(L*0}?i<-Y8EaCXovS4afI=$7_03ujW}U{02FvlvV%$ literal 1915 zcmZux&u<$=6rMNh9~;|o+YnW4T3`tklB?n*MXC@=qPBq>iV!&znWompvq>EPN@mu` zwro+=k$__l+~LSy!GFPFuN)w^oXa76Z`Nz4fwAVzn>Vx1?|a{S^K^bbCosNUTzGLi zBgCJ)NrnUEF{U|$P(o2tw5UQP)HUU()G1Y@x~|eH1IZ`qs@B|HG3#lV;#W2qCXij$A6(sq?VBm8BF6HcR)QFvcTf z1XGS3iuV$G8SfPVs~miM73(C9;D6z6mmK@IQA!7XGfLH4{sBy=B%!k`To#No7F=vm z{t}#PFc^-Lv1kTWlf1)V>y&3MLFQ;tjHG4I(T|4E?ud~CWDdBOB!==AaQ`d4W#bxf zw8Cw$J2?^4+cdpxZ4<^n-9q-eAy|!B@CF;b`~3%&@7iHdYk1+IA9{n8-o{4XS_dor zjg4M8;om}u^3^KWjH-WEt(H==v_v$B=;Uf%=B(!`ZZ86@xd|bp3vOMo%)dm_3plCq zF%QlWmjtioD+qec%2h(tv2cTuQFq*XAYk88|iMi$uwta$Tkmc2g z>R0f-$*ni*Cgcone#q|FcSa1nFfd_~xAJtcRHXejI>!nXCsB zMIkcrVVs-v$+2H_4K#q*{J>7{|eHsqJCQs^!5t*6;Gc pdn|0wv!~5!mQ{DX)luDMu*ryQlN6j>E|+$TZq}XS=ej@{`WIZ8dHVnW 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.