Author: Brian Kearns <[email protected]>
Branch:
Changeset: r68427:0edc9b68247e
Date: 2013-12-13 17:40 -0500
http://bitbucket.org/pypy/pypy/changeset/0edc9b68247e/
Log: test bin() of numpy scalar
diff --git a/pypy/module/micronumpy/test/test_scalar.py
b/pypy/module/micronumpy/test/test_scalar.py
--- a/pypy/module/micronumpy/test/test_scalar.py
+++ b/pypy/module/micronumpy/test/test_scalar.py
@@ -26,6 +26,9 @@
assert hex(np.int32(11)) == '0xb'
assert hex(np.float32(11.6)) == '0xb'
assert hex(np.complex64(11-12j)) == '0xb'
+ assert bin(np.int32(11)) == '0b1011'
+ exc = raises(TypeError, "bin(np.float32(11.6))")
+ assert exc.value.message.find('object cannot be interpreted as an
index') != -1
def test_pickle(self):
from numpypy import dtype, zeros
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit