@@ -91,8 +91,7 @@ async def credential_helper() -> CredentialHelper:
9191 )
9292
9393
94- @pytest .fixture (scope = "session" )
95- def athena_options () -> AthenaOptions :
94+ def _load_options () -> AthenaOptions :
9695 _ = load_dotenv ()
9796 host = os .getenv ("ATHENA_HOST" , "localhost" )
9897
@@ -115,6 +114,11 @@ def athena_options() -> AthenaOptions:
115114 )
116115
117116
117+ @pytest .fixture
118+ def athena_options () -> AthenaOptions :
119+ return _load_options ()
120+
121+
118122@pytest .fixture (scope = "session" , params = SUPPORTED_TEST_FORMATS )
119123def valid_formatted_image (
120124 request : pytest .FixtureRequest ,
@@ -222,11 +226,12 @@ async def send(self, image_data: ImageData) -> ClassificationOutput:
222226
223227@pytest_asyncio .fixture (scope = "session" , loop_scope = "session" )
224228async def streaming_sender (
225- athena_options : AthenaOptions , credential_helper : CredentialHelper
229+ credential_helper : CredentialHelper ,
226230) -> StreamingSender :
227231 """Fixture to provide a helper for sending over a streaming connection."""
228232 # Create gRPC channel with credentials
233+ opts = _load_options ()
229234 channel = await create_channel_with_credentials (
230- athena_options .host , credential_helper
235+ opts .host , credential_helper
231236 )
232- return StreamingSender (channel , athena_options )
237+ return StreamingSender (channel , opts )
0 commit comments