From ebfc16e84d768fff2d904ac232b7be75f87f2a38 Mon Sep 17 00:00:00 2001 From: Hao Jin Date: Fri, 29 Jun 2018 17:08:16 -0400 Subject: [PATCH] test for new int64 type in CSVIter (#11499) --- tests/python/unittest/test_io.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/python/unittest/test_io.py b/tests/python/unittest/test_io.py index dbd327d429f7..4dfa69cc1050 100644 --- a/tests/python/unittest/test_io.py +++ b/tests/python/unittest/test_io.py @@ -317,6 +317,8 @@ def check_CSVIter_synthetic(dtype='float32'): entry_str = '1' if dtype is 'int32': entry_str = '200000001' + if dtype is 'int64': + entry_str = '2147483648' with open(data_path, 'w') as fout: for i in range(1000): fout.write(','.join([entry_str for _ in range(8*8)]) + '\n') @@ -332,7 +334,7 @@ def check_CSVIter_synthetic(dtype='float32'): assert_almost_equal(data_batch.asnumpy(), expected.asnumpy()) assert data_batch.asnumpy().dtype == expected.asnumpy().dtype - for dtype in ['int32', 'float32']: + for dtype in ['int32', 'int64', 'float32']: check_CSVIter_synthetic(dtype=dtype) @unittest.skip("Flaky test: https://github.com/apache/incubator-mxnet/issues/11359")