[pypy-commit] lang-smalltalk default: blackbox test that wrapping image floats in W_Float works

timfel noreply at buildbot.pypy.org
Wed Mar 13 17:47:41 CET 2013


Author: Tim Felgentreff <timfelgentreff at gmail.com>
Branch: 
Changeset: r176:ecdc6623d046
Date: 2013-03-13 17:47 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/ecdc6623d046/

Log:	blackbox test that wrapping image floats in W_Float works

diff --git a/spyvm/test/test_miniimage.py b/spyvm/test/test_miniimage.py
--- a/spyvm/test/test_miniimage.py
+++ b/spyvm/test/test_miniimage.py
@@ -322,3 +322,10 @@
     w_result = perform(w("someString"), "asSymbol")
     assert w_result is not None
     assert w_result.as_string() == "someString"
+
+def test_pi_as_w_float():
+    import math
+    w_result = perform(interp.space.w_Float, "pi")
+    assert w_result is not None
+    assert isinstance(w_result, model.W_Float)
+    assert w_result.value == math.pi


More information about the pypy-commit mailing list