Closed cLupus closed 5 years ago
Hi there! Did this fix any tests? If not, should tests be added to prove the fix works?
Do you have a suggestion on how to write a test for that?
Note that, the previous two tests (pow(3, -4, 5)
, and some other pow
with a negative power, and a modulo) failed before this PR.
Well, I can't seem to be able to approve the PR, but I can verify that when I run the tests on Python 3.6, there are two failing tests in tests.builtins.test_pow.PowTests
-- test_int_neg_y_pos_z
and test_int_neg_y_neg_z
-- which fail without the PR, and pass with it; and as far as I can see, this is exactly what the PR set out to fix.
@shaib Hrm - that's odd - any idea why those tests aren't failing on CI?
Thanks for the PR, @cLupus! It looks like this got covered by another PR, so I'm going to close this out.
pow(x, y, z)
throw aValueError
wheny
is negative, whilex
, and ,z
are positive.Additionally cleaned up the javascript with ECMAscript 6 recommendations; i.e. the use of
let
, orconst
instead ofvar
, and triple=
instead of double.Related issue: #46
PR Checklist: