[pypy-commit] pypy default: since pack() uses copysign, avoid testing copysign(1.0, float('nan')) which is platform dependent
mattip
noreply at buildbot.pypy.org
Sun Jun 15 22:29:46 CEST 2014
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r72069:e01f896e6bfc
Date: 2014-06-15 20:38 +0300
http://bitbucket.org/pypy/pypy/changeset/e01f896e6bfc/
Log: since pack() uses copysign, avoid testing copysign(1.0,
float('nan')) which is platform dependent
diff --git a/rpython/rlib/rstruct/test/test_ieee.py b/rpython/rlib/rstruct/test/test_ieee.py
--- a/rpython/rlib/rstruct/test/test_ieee.py
+++ b/rpython/rlib/rstruct/test/test_ieee.py
@@ -198,8 +198,9 @@
def check_roundtrip(x, size):
s = c_pack(x, size)
- assert s == pack(x, size)
if not isnan(x):
+ # pack uses copysign which is ambiguous for NAN
+ assert s == pack(x, size)
assert unpack(s) == x
assert c_unpack(s) == x
else:
More information about the pypy-commit
mailing list