[pypy-commit] pypy py3k: test against py3's pow behavior
pjenvey
noreply at buildbot.pypy.org
Tue Apr 30 22:56:44 CEST 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r63775:c0a21ffcbb97
Date: 2013-04-30 13:55 -0700
http://bitbucket.org/pypy/pypy/changeset/c0a21ffcbb97/
Log: test against py3's pow behavior
diff --git a/pypy/objspace/std/test/test_floatobject.py b/pypy/objspace/std/test/test_floatobject.py
--- a/pypy/objspace/std/test/test_floatobject.py
+++ b/pypy/objspace/std/test/test_floatobject.py
@@ -26,10 +26,8 @@
assert v.floatval == x ** y
f1 = fobj.W_FloatObject(-1.23)
f2 = fobj.W_FloatObject(-4.56)
- self.space.raises_w(self.space.w_ValueError,
- fobj.pow__Float_Float_ANY,
- self.space, f1, f2,
- self.space.w_None)
+ v = fobj.pow__Float_Float_ANY(self.space, f1, f2, self.space.w_None)
+ assert self.space.isinstance_w(v, self.space.w_complex)
x = -10
y = 2.0
f1 = fobj.W_FloatObject(x)
@@ -218,7 +216,7 @@
assert espeq(pw(4.0, 0.5), 2.0)
assert pw(4.0, 0) == 1.0
assert pw(-4.0, 0) == 1.0
- raises(ValueError, pw, -1.0, 0.5)
+ assert type(pw(-1.0, 0.5)) == complex
assert pw(-1.0, 2.0) == 1.0
assert pw(-1.0, 3.0) == -1.0
assert pw(-1.0, 1e200) == 1.0
More information about the pypy-commit
mailing list