Skip to content

Commit 6e3f987

Browse files
committed
improve b64 test coverage include 2 item arrays too
1 parent b93033f commit 6e3f987

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/image/convert_b64.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
skipKeys = [
2323
'geojson',
24-
'layers'
24+
'layers',
25+
'range'
2526
]
2627

2728
def arraysToB64(obj, newObj) :
@@ -48,8 +49,13 @@ def arraysToB64(obj, newObj) :
4849

4950
newObj[key] = newList
5051
else :
51-
# skip converting arrays with 2 items or less
52-
if(arr.ndim == 1 and arr.shape[0] < 3) :
52+
# In a real application one does not need to convert
53+
# small arrays like those that only have 2 items.
54+
# But here we convert 2 item array to test typed arrays
55+
# in more places.
56+
57+
# skip converting arrays with 1 item or less
58+
if(arr.ndim == 1 and arr.shape[0] < 2) :
5359
newObj[key] = val
5460
continue
5561

0 commit comments

Comments
 (0)