Skip to content

Commit b36b236

Browse files
committed
Remove an isinstance check
1 parent 216b0ce commit b36b236

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/conftest.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def cloud_reco_client(_mock_database: VuforiaDatabase) -> CloudRecoService:
4747
)
4848

4949

50-
@pytest.fixture
51-
def image_file(
50+
@pytest.fixture(name="image_file")
51+
def image_file_fixture(
5252
high_quality_image: io.BytesIO,
5353
tmp_path: Path,
5454
) -> Generator[io.BufferedRandom, None, None]:
@@ -63,8 +63,10 @@ def image_file(
6363
@pytest.fixture(params=["high_quality_image", "image_file"])
6464
def image(
6565
request: pytest.FixtureRequest,
66+
high_quality_image: io.BytesIO,
67+
image_file: io.BufferedRandom,
6668
) -> io.BytesIO | io.BufferedRandom:
6769
"""An image in any of the types that the API accepts."""
68-
result = request.getfixturevalue(request.param)
69-
assert isinstance(result, io.BytesIO | io.BufferedRandom)
70-
return result
70+
if request.param == "high_quality_image":
71+
return high_quality_image
72+
return image_file

0 commit comments

Comments
 (0)