File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff 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" ])
6464def 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
You can’t perform that action at this time.
0 commit comments