@@ -131,7 +131,7 @@ def load_image_base64(file_name: str) -> str:
131131
132132# ---------------- Tests ----------------
133133@pytest .mark .skipif (not VOYAGE_API_KEY , reason = "Voyage API key not set" )
134- class TestMultimodalSearch :
134+ class TestMultimodalSearch : # pylint: disable=no-member
135135 """Multi-modal search tests"""
136136
137137 @pytest .fixture (autouse = True )
@@ -216,11 +216,12 @@ def setup_index(self, request):
216216 ), f"Expected { len (MOVIES )} documents, got { stats .number_of_documents } "
217217
218218 # Store for tests on the class
219+ # Use request.cls to ensure attributes are available on test instances
219220 request .cls .client = client
220221 request .cls .index = index
221222 request .cls .search_client = Client (common .BASE_URL , common .MASTER_KEY ) # Search client
222223
223- def test_text_query (self ): # pylint: disable=no-member
224+ def test_text_query (self ):
224225 """Test text query search"""
225226 query = "The story follows Carol Danvers"
226227 response = self .search_client .index (INDEX_UID ).search (
@@ -239,7 +240,7 @@ def test_text_query(self): # pylint: disable=no-member
239240 )
240241 assert response ["hits" ][0 ]["title" ] == "Captain Marvel"
241242
242- def test_image_query (self ): # pylint: disable=no-member
243+ def test_image_query (self ):
243244 """Test image query search"""
244245 # Find Dumbo in the movies list
245246 dumbo_movie = next (m for m in MOVIES if m ["title" ] == "Dumbo" )
@@ -261,7 +262,7 @@ def test_image_query(self): # pylint: disable=no-member
261262 )
262263 assert response ["hits" ][0 ]["title" ] == "Dumbo"
263264
264- def test_text_and_image_query (self ): # pylint: disable=no-member
265+ def test_text_and_image_query (self ):
265266 """Test text and image query"""
266267 query = "a futuristic movie"
267268 master_yoda_base64 = load_image_base64 ("master-yoda.jpeg" )
0 commit comments