Skip to content

Commit 6a9e5dc

Browse files
committed
(issue 574): added new test array 'io_int_labels' (wide only)
1 parent 6941fa0 commit 6a9e5dc

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

larray/tests/data/test.xlsx

919 Bytes
Binary file not shown.

larray/tests/data/testint_labels.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
a,b\c,0,1,2
2+
0,0,0,1,2
3+
0,1,3,4,5
4+
0,2,6,7,8
5+
1,0,9,10,11
6+
1,1,12,13,14
7+
1,2,15,16,17
8+
2,0,18,19,20
9+
2,1,21,22,23
10+
2,2,24,25,26

larray/tests/test_array.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def setUp(self):
9191
self.io_1d = ndtest(3)
9292
self.io_2d = ndtest("a=1..3; b=b0,b1")
9393
self.io_3d = ndtest("a=1..3; b=b0,b1; c=c0..c2")
94+
self.io_int_labels = ndtest("a=0..2; b=0..2; c=0..2")
9495
self.io_unsorted = ndtest("a=3..1; b=b1,b0; c=c2..c0")
9596
self.io_missing_values = ndtest("a=1..3; b=b0,b1; c=c0..c2", dtype=float)
9697
self.io_missing_values[2, 'b0'] = np.nan
@@ -2608,6 +2609,9 @@ def test_read_csv(self):
26082609
res = read_csv(inputpath('test3d.csv'))
26092610
assert_array_equal(res, self.io_3d)
26102611

2612+
res = read_csv(inputpath('testint_labels.csv'))
2613+
assert_array_equal(res, self.io_int_labels)
2614+
26112615
res = read_csv(inputpath('test2d_classic.csv'))
26122616
assert_array_equal(res, ndtest("a=a0..a2; b0..b2"))
26132617

@@ -2675,6 +2679,9 @@ def test_read_excel_xlwings(self):
26752679
arr = read_excel(inputpath('test.xlsx'), '3d')
26762680
assert_array_equal(arr, self.io_3d)
26772681

2682+
arr = read_excel(inputpath('test.xlsx'), 'int_labels')
2683+
assert_array_equal(arr, self.io_int_labels)
2684+
26782685
arr = read_excel(inputpath('test.xlsx'), '2d_classic')
26792686
assert_array_equal(arr, ndtest("a=a0..a2; b0..b2"))
26802687

@@ -2756,6 +2763,9 @@ def test_read_excel_pandas(self):
27562763
arr = read_excel(inputpath('test.xlsx'), '3d', engine='xlrd')
27572764
assert_array_equal(arr, self.io_3d)
27582765

2766+
arr = read_excel(inputpath('test.xlsx'), 'int_labels', engine='xlrd')
2767+
assert_array_equal(arr, self.io_int_labels)
2768+
27592769
arr = read_excel(inputpath('test.xlsx'), '2d_classic', engine='xlrd')
27602770
assert_array_equal(arr, ndtest("a=a0..a2; b0..b2"))
27612771

0 commit comments

Comments
 (0)