diff options
author | cgohlke <cgohlke@uci.edu> | 2012-08-06 17:04:33 -0700 |
---|---|---|
committer | cgohlke <cgohlke@uci.edu> | 2012-08-06 17:04:33 -0700 |
commit | 1079fa42597e2a8900110f7498236e9f034d1179 (patch) | |
tree | eaa323e622a519ba8a1159398d04c46c53dfdaa1 /numpy | |
parent | d009f0f5f67dc4bad97560487d61fc399cb23c06 (diff) | |
download | numpy-1079fa42597e2a8900110f7498236e9f034d1179.tar.gz |
Add test for long numbers in numpy.rec.array formats string
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_records.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/core/tests/test_records.py b/numpy/core/tests/test_records.py index 87c661938..7b1f9cd55 100644 --- a/numpy/core/tests/test_records.py +++ b/numpy/core/tests/test_records.py @@ -1,3 +1,4 @@ +import sys from os import path import numpy as np from numpy.testing import * @@ -111,6 +112,13 @@ class TestFromrecords(TestCase): assert_equal(a.b, ['a', 'bbb']) assert_equal(a[-1].b, 'bbb') + @dec.skipif(sys.version_info[0] > 2) + def test_recarray_from_long_formats(self): + # Pull request #376 + a = [[1]] + ra = np.rec.array(a, shape=1, formats='(1L, 1L)i4') + assert_equal(a, ra.f0[0]) + class TestRecord(TestCase): def setUp(self): |