Skip to content

Commit 5ccef64

Browse files
committed
Merge remote-tracking branch 'origin/master' into max-image-size-png
2 parents 457183f + 1e2bd59 commit 5ccef64

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ flake8==3.5.0 # Lint
66
flake8-commas==2.0.0 # Require silicon valley commas
77
flake8-quotes==1.0.0 # Require single quotes
88
freezegun==0.3.10 # Freeze time in tests
9-
hypothesis==3.59.0 # Generate test cases
9+
hypothesis==3.59.1 # Generate test cases
1010
isort==4.3.4 # Lint imports
1111
mypy==0.610 # Type checking
1212
pip_check_reqs==2.0.3

tests/mock_vws/fixtures/images.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88
from _pytest.fixtures import SubRequest
99

10-
from tests.mock_vws.utils import image_file
10+
from tests.mock_vws.utils import make_image_file
1111

1212

1313
@pytest.fixture
@@ -16,23 +16,38 @@ def png_rgb_success() -> io.BytesIO:
1616
Return a PNG file in the RGB color space which is expected to have a
1717
'success' status when added to a target.
1818
"""
19-
return image_file(file_format='PNG', color_space='RGB', width=5, height=5)
19+
return make_image_file(
20+
file_format='PNG',
21+
color_space='RGB',
22+
width=5,
23+
height=5,
24+
)
2025

2126

2227
@pytest.fixture
2328
def png_rgb() -> io.BytesIO:
2429
"""
2530
Return a 1x1 PNG file in the RGB color space.
2631
"""
27-
return image_file(file_format='PNG', color_space='RGB', width=1, height=1)
32+
return make_image_file(
33+
file_format='PNG',
34+
color_space='RGB',
35+
width=1,
36+
height=1,
37+
)
2838

2939

3040
@pytest.fixture
3141
def png_greyscale() -> io.BytesIO:
3242
"""
3343
Return a 1x1 PNG file in the greyscale color space.
3444
"""
35-
return image_file(file_format='PNG', color_space='L', width=1, height=1)
45+
return make_image_file(
46+
file_format='PNG',
47+
color_space='L',
48+
width=1,
49+
height=1,
50+
)
3651

3752

3853
@pytest.fixture()
@@ -62,7 +77,7 @@ def jpeg_cmyk() -> io.BytesIO:
6277
"""
6378
Return a 1x1 JPEG file in the CMYK color space.
6479
"""
65-
return image_file(
80+
return make_image_file(
6681
file_format='JPEG',
6782
color_space='CMYK',
6883
width=1,
@@ -75,7 +90,7 @@ def jpeg_rgb() -> io.BytesIO:
7590
"""
7691
Return a 1x1 JPEG file in the RGB color space.
7792
"""
78-
return image_file(
93+
return make_image_file(
7994
file_format='JPEG',
8095
color_space='RGB',
8196
width=1,
@@ -91,7 +106,7 @@ def tiff_rgb() -> io.BytesIO:
91106
This is given as an option which is not supported by Vuforia as Vuforia
92107
supports only JPEG and PNG files.
93108
"""
94-
return image_file(
109+
return make_image_file(
95110
file_format='TIFF',
96111
color_space='RGB',
97112
width=1,

tests/mock_vws/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def query(
422422
return response
423423

424424

425-
def image_file(
425+
def make_image_file(
426426
file_format: str,
427427
color_space: str,
428428
width: int,

0 commit comments

Comments
 (0)