summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-06-03 22:46:08 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-06-03 22:46:08 +0200
commit21ea30b00cf79ae3107a54b1592efe1571d5a7d7 (patch)
tree8f7b7346169b8a778de7861d08b00cb7f663cb6e
parentf7f838b0ac042eacba9de43005d40475dd97ce97 (diff)
downloadnumpy-21ea30b00cf79ae3107a54b1592efe1571d5a7d7.tar.gz
TST: add a format 2.0 roundtrip test
-rw-r--r--numpy/lib/tests/test_io.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index 52b294c2b..49ad1ba5b 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -166,6 +166,13 @@ class RoundtripTest(object):
a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'), ('y', 'i4')])
self.check_roundtrips(a)
+ def test_format_2_0(self):
+ dt = [(("%d" % i) * 100, float) for i in range(500)]
+ a = np.ones(1000, dtype=dt)
+ with warnings.catch_warnings(record=True):
+ warnings.filterwarnings('always', '', UserWarning)
+ self.check_roundtrips(a)
+
class TestSaveLoad(RoundtripTest, TestCase):
def roundtrip(self, *args, **kwargs):