Skip to content

Commit 084606d

Browse files
committed
Progress towards tests which show error
1 parent e211a65 commit 084606d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/mock_vws/test_query.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,10 @@ class TestMaximumImageSize:
10671067
Tests for maximum image sizes.
10681068
"""
10691069

1070+
def _png(width: int, height: int):
1071+
"""
1072+
XXX
1073+
"""
10701074
def test_png(
10711075
self,
10721076
vuforia_database_keys: VuforiaDatabaseKeys,
@@ -1077,14 +1081,13 @@ def test_png(
10771081
"""
10781082
file_format = 'PNG'
10791083
color_space = 'RGB'
1080-
# max_size = 698895 no error
1081-
# max_size = 698896 connection error
1082-
max_size = 698895
1083-
width = height = int(math.sqrt(max_size))
1084+
# 835 no error, 836 error
1085+
width = height = 836
1086+
width = height = 835
10841087

10851088
# # This gives 422 on real, 200 on mock
1086-
width = 1
1087-
height = int(max_size / 2)
1089+
# width = 1
1090+
# height = int(max_size / 2)
10881091

10891092
image_buffer = io.BytesIO()
10901093
image = Image.new(color_space, (width, height))
@@ -1094,8 +1097,7 @@ def test_png(
10941097
red = random.randint(0, 255)
10951098
green = random.randint(0, 255)
10961099
blue = random.randint(0, 255)
1097-
if color_space != 'L':
1098-
pixels[j, i] = (red, green, blue)
1100+
pixels[j, i] = (red, green, blue)
10991101
image.save(image_buffer, file_format)
11001102
image_buffer.seek(0)
11011103

0 commit comments

Comments
 (0)